Hi, I am working with a hardware/firmware combination that have worked together previously, however I have just installed keil on a new computer. When I compile the firmware and program the AT91SAM7SE256 it will not run. I have commented out code and reduced the firmware to a flashing led (after hardware initiation) and found that as soon as a malloc function is included in the code, it breaks. It will still compile and program but the led will no longer flash, the debugger gives me no useful information.It seems that stdlib is being linked correctly as I can use other functions from it without an issue. Has anyone got any ideas of what could be going on?
P.S. I am new to keil development environment
Thanks for your help
Have you reserved any space for the heap?
Hi,
if you open the startup asm file from the project tree, you can switch to 'Configuration Wizzard' (Which is embedded commands in all Keil startup files), see TABs below the Editor.
There you can select the amount of Stack and Heap you whish to 'reserve' for your project.
. BR, /th.
http://www.keil.com/support/man/docs/gsac/
http://www.keil.com/support/man/docs/uv4/uv4_ex_hello.htm
http://www.keil.com/events/classlist.asp
http://www.keil.com/events/seminarlist.asp
http://www.keil.com/events/links.asp
Hi, Thanks for your comments everyone.
The stack and heap sizes are defined in the linker scatter file using
ARM_LIB_STACK 0x208000 EMPTY -0x2000 {} ARM_LIB_HEAP 0x80070000 EMPTY 0x0000FF00 {}
so the heap and stack settings in the startup assembly file are mostly commented out
I think I have found my problem:
IMPORT __use_two_region_memory
was not included in the startup asm.
Thanks for your help everyone