This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problems when using printf

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

Parents
  • 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

Reply
  • 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

Children