2019-10-20 01:44 PM
Error message is
c:/eclipse/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.17.0.201812190825/tools/compiler/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: region `RAM' overflowed by 957840 bytes.
Output.map tells
_estack = 0x20018000
Using eclipse,
Is there any way to make more space so that the code could compile? For this project, I only need 14443A.
Thanks in advance.
Olivier Bontron
Solved! Go to Solution.
2019-10-22 11:17 PM
Hi,
static uint8_t filterlut[1 << 20];
evaluates to:
static uint8_t filterlut[1048576];
The code you are using is not adequate for usage on such a small controller. I see a LOWMEM compile time switch - don't know if it is operational or what it does.
Regards, Ulysses
2019-10-20 06:29 PM
What are you doing that needs 1.25MB of RAM on a part with a fraction of that?
2019-10-20 11:00 PM
> Output.map tells
> _estack = 0x20018000
This is the location, not the size.
> I only need 14443A.
This are 1.328.186 bytes. Quite a bit more then the 96k your MCU has.
Check your map file.
2019-10-21 12:33 AM
Hi, thanks for answering.
I have been using STM32F4xx-Nucleo-Polling without any problem compiling up to the point where I added 3 files, respectively 100 lines 3k, 100 lines 3k and 500 lines 16k long. No reason to overflow by 1MB.
Olivier
2019-10-21 12:41 AM
So perhaps some PC centric code with some large arrays?
Review the code to better understand it, and look at the .MAP for likely candidates.
2019-10-21 06:12 AM
Hi,
Maybe you can use ISO 15693 - produces much smaller numbers....
*SCNR*
I think there is some misunderstanding happening: Olivier is referring to ISO14443/A and not to a size of 0x14443a....
But the rest of the comments are right.... Look at the map file if it is created. If not you can always execute one of "fromelf.exe -z", "size" (GNU binutils), "objdump" (GNU binutils) to see the sizes of the obj files. Especially look at the RAM.
Regards, Ulysses
2019-10-22 10:16 AM
Hi
I identified that the error message takes place when I add this code :
#define filter(x) (filterlut[(x) & 0xfffff])
The complete code is : (the context is encryption)
#if !defined LOWMEM && defined __GNUC__
static uint8_t filterlut[1 << 20];
static void __attribute__((constructor)) fill_lut(void)
{
uint32_t i;
for (i = 0; i < 1 << 20; ++i)
filterlut[i] = filter(i);
}
#define filter(x) (filterlut[(x) & 0xfffff])
#endif
Commented : ok
With //#define filter(x) (filterlut[(x) & 0xfffff]) :
It compiles and the map tells :
...
.text.filter 0x00000000 0x68 Middlewares/ST/RFAL/rfal_nfca.o
.text.startup.fill_lut 0x00000000 0x2 Middlewares/ST/RFAL/rfal_nfca.o
.text.crypto1_create 0x00000000 0x6c Middlewares/ST/RFAL/rfal_nfca.o
.text.crypto1_destroy 0x00000000 0x4 Middlewares/ST/RFAL/rfal_nfca.o
.text.crypto1_get_lfsr 0x00000000 0x4c Middlewares/ST/RFAL/rfal_nfca.o
.text.crypto1_bit 0x00000000 0x60 Middlewares/ST/RFAL/rfal_nfca.o
.text.crypto1_byte 0x00000000 0x30 Middlewares/ST/RFAL/rfal_nfca.o
.text.crypto1_word ...
Name Origin Length Attributes
RAM 0x20000000 0x00018000 xrw
FLASH 0x08000000 0x00080000 xr
*default* 0x00000000 0xffffffff
Uncommented : error
With #define filter(x) (filterlut[(x) & 0xfffff])
It does not compile.
The error message :
c:/eclipse/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.17.0.201812190825/tools/compiler/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: STM32F4xx-Nucleo-Polling.elf section `.bss' will not fit in region `RAM'
c:/eclipse/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.17.0.201812190825/tools/compiler/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: region `RAM' overflowed by 957832 bytes
and within the map, no mention of filter any longer. It tells :
.text 0x00000000 0x0 Middlewares/ST/RFAL/rfal_nfca.o
.data 0x00000000 0x0 Middlewares/ST/RFAL/rfal_nfca.o
.text.crypto1_create 0x00000000 0x6c Middlewares/ST/RFAL/rfal_nfca.o
.text.crypto1_destroy 0x00000000 0x4 Middlewares/ST/RFAL/rfal_nfca.o
.text.crypto1_get_lfsr 0x00000000 0x4c Middlewares/ST/RFAL/rfal_nfca.o
.text.crypto1_bit 0x00000000 0x64 Middlewares/ST/RFAL/rfal_nfca.o
.text.crypto1_byte 0x00000000 0x30 Middlewares/ST/RFAL/rfal_nfca.o
.text.crypto1_word ...
Name Origin Length Attributes
RAM 0x20000000 0x00018000 xrw
FLASH 0x08000000 0x00080000 xr
*default* 0x00000000 0xffffffff
Regards,
Olivier
2019-10-22 10:36 AM
Additional information
Highest address in the 2000xxxx range is 0x20001d88 . = ALIGN (0x8)
Thanks
Olivier
2019-10-22 11:17 PM
Hi,
static uint8_t filterlut[1 << 20];
evaluates to:
static uint8_t filterlut[1048576];
The code you are using is not adequate for usage on such a small controller. I see a LOWMEM compile time switch - don't know if it is operational or what it does.
Regards, Ulysses
2019-10-26 06:10 AM
Ulysses,
You were right, that was the culprit and so far, there was no necessity.
Best regards
Olivier Bontron