[En-Nut-Discussion] Code size to large for one flash bank

Bernd Walter enut at cicely.de
Mon Dec 27 12:18:06 CET 2010


On Mon, Dec 27, 2010 at 10:37:13AM +0100, Andre Riesberg wrote:
> Hello all!
> 
> The codes size of my application grows and exceeds the limit of 262144 
> bytes.
> Now I got the message from OpenOCD:
> "Warn: writing 262144 bytes only ??? as image section is 270228 bytes and 
> bank is only 262144 bytes."
> I use a board like the EIR with ARM7TMI and the Turtelizer2 with the 
> command line: "C:\ethernut-4.8.3\nut\tools\win32\openocd.exe -f 
> interface\turtelizer2.cfg -f eir.cfg".
> 
> So, I have two questions:
> 
> How I have to modify the config scripts to support the second flash bank?

IIRC you just need to setup the bigger rom size in the loader script.
>From the software point of view this is just a single large rom space.

Care must be taken if you write data to the flash - I'm not sure if the
ethernut flashing routine supports multiple banks.
If you don't use this feature there is no problem.

> It is possible to force some functions (module) into thump mode to save 
> space? I have seen thump-interwork is enabled in NutOS. Is there 
> something like __attribute__((thump)) for functions?

Not that I know.
I've declared many Makefiles for thumb in my own environment, which is
based on 4.9.8.
First I'd started with my application code and than with all possible
Ethernut sourcefiles.
Generally speaking it is mostly the interrupt routines left and the
size difference was rather hughe.
I'm able to run Nut/OS on SAM7S32 and SAM7S321 with this - although
without IP on those.
Speedwise it is also a win with SAM7S/X since the flash controller has
waitstate-free prefetching for 16bit instructions only.

-- 
B.Walter <bernd at bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



More information about the En-Nut-Discussion mailing list