[chbot] Any ARM savvy people?

Robin Gilks robin at gilks.org
Tue Oct 11 09:58:12 BST 2016


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!!

-- 
Robin Gilks






More information about the Chchrobotics mailing list