[chbot] Any ARM savvy people?
Mark Atherton
markaren1 at xtra.co.nz
Tue Oct 11 10:40:13 BST 2016
random thoughts:
have seen these kinds of things with structs before
have you packed u8's & u16's into 32 bit lumps, or are the elements a
mix of types, jamb-packed together ?
don't suppose that your FLASH uses 256 byte sectors ? :)
can you post the struct, also, what type of FLASH ?
-Mark
On 11/10/2016 9:58 PM, Robin Gilks wrote:
> I've hit a problem with the arm-none-eabi-gcc compiler that just doesn't
> make sense.
>
> I'm developing some code on an STM32F303xC system and use a struct to hold
> config data that gets copied to/from an external flash NOR chip. It's all
> worked great until I added a few more members and the size of the struct
> went over 256 bytes.
>
> An arbitrary function (which doesn't directly use the struct) is truncated
> and a b.n infinite loop instruction inserted in (what should be) the
> middle. Reduce the size of the struct and is all OK again.
>
> I've tried playing with pack attributes but if the total size is over 256
> bytes then boom!
>
> I'm getting the same with the standard Debian Jessie install:
> gcc version 4.8.4 20141219 (release) (4.8.4-1+11-1)
> and the AC6 version used by STM32 WorkBench Eclipse plugin
> gcc version 5.2.1 20151202 (release) [ARM/embedded-5-branch revision
> 231848] (GNU Tools for ARM Embedded Processors)
>
> Got 10k of RAM space and over 200k of flash code space left - I just don't
> understand!!
>
More information about the Chchrobotics
mailing list