We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi !
My program crashes when using printf(). I use MDK ARM V3.0 together with KEIL-Debugger an ARM STR7-Controller. When program runs in debugger -> no problem. When disable interrupts -> no problem When I change the file scat.scf to start the program from address 0x40000000 -> no problem
But I want to use the IAP-Driver in sector 0 and so my program should be able to start at 0x40002000. Is there something wrong with interrupt vectors ?
My program is based on the KEIL-IAP example.
Has anyone on idea?
best regards
Marc
The interrupt vectors (They are actually instructions on the ARM) ALWAYS need to be at address 0. The STR7 maps FLASH to address 0 on power up, meaning that 0x40000000 i s mapped to address 0. The STR allows you to map RAM to address 0 or external memory to address 0. It does not allow you to map address 0x40002000.
Hi Robert !
Thanks for answer. I mapped RAM at address 0 and copy the vector_table at this address. Interrupt functions works good when not using printf().
Are you running interrupts from RAM when it works and the only difference is printf? What does the printf look like? Are you reserving the RAM at 0x20000000 so that no variables are allocated at that location? How many bytes for the interrupt "vectors" are you copying? (It should be at least 48 bytes)
Hi,
- when running the program in debugger it always works - when running without debugger it only works, when not using printf() or sprintf()
So I think the question is: What is the problem with functions like printf() and what is the difference when running the programm in debugger?
I use the following file "scat.scf" for the linker.
FLASH 0x40002000 0x40000 { FLASH 0x40002000 { 71x_init.o (Init, +First) *.*o (+RO) } RAM 0x20000000 { 71x_vect.o (Vect, +First) *.*o (+RW) *.*o (+ZI) } }
regards Marc
Sorry if I am getting side tracked. I can run sprintf with and without the debbugger (I don't know about printf). Not sure I can be of any more help than that.