__thumb_startup(void) function issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

__thumb_startup(void) function issue

1,313 Views
manuchehrebrahi
Contributor III

Hi,

There is no interrupt used on the test code that I have as well as I didn't add COP (Watchdog Timer) to the components. However on the debug mode, when it runs in Resume mode, it calls __thumb_startup(void) function which I believe it CPU reset function handler, but when it goes to step by step then, it never call that function and stays in the main routine. Please let me know if you have any comment on this.

Thanks,

0 Kudos
8 Replies

939 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Space,

It looks lice the device made a reset, there can be many reasons for this,

like stack overflow , accessing illegal instructions ....

And  there is another possible , please check your code , whether had a breakpoint  on the function which is not linked or not used now .

" Failed to Debug with GDB: Breakpoints or Expressions on non-existing Locations | MCU on Eclipse "

Hope it helps

Alice

939 Views
manuchehrebrahi
Contributor III

Hi Alice and Happy New Year!

I am sure you are busy with lots of things came up over the holiday but I was wondering if you have received the files that I uploaded and had a chance to look at that. I look forward to hear from you on this matter.

Regards,

0 Kudos

939 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi Space4,

Happy New Year to you !

I have received anything . ON the web , there has not your reply before you this reply.

Could you send it again .I will check as soon as possilbe.

Alice

0 Kudos

939 Views
manuchehrebrahi
Contributor III

I made code so small (just one function to call) and compiled the program. It compiled it with no error like before. Then tried to flash the program to the MCU on the FRDM but then shows this message in Red,

No source available for "(gdb[12].proc[42000].threadGroup[i1],gdb[12].proc[42000].OSthread[1]).thread[1].frame[0]"

View Disassembly

When I looked at Disassembly, I saw that it calls the __thumb_startuo(void) function. So now question is what is causing these message after trying to program MCU on the FRDM.

Thanks,

0 Kudos

939 Views
Rick_Li
NXP Employee
NXP Employee

Hi,

Can you please upload your new created program here for further investigating?

0 Kudos

939 Views
manuchehrebrahi
Contributor III

Hi Li,

Yes, of course but how do I upload it here? There is no attachment option in here.

0 Kudos

939 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hi  Space,

When you want upload attchment,  please click here :


1.png

then

2.png

Alice

0 Kudos

939 Views
manuchehrebrahi
Contributor III

Hi Alice and thanks for your reply. We just running out of project time and I was thinking we may have to switch to other MCU. It is really good to hear someone is there.

On the debug, I see check marked breakpoints on the main function which is not generated by me. This is the message after the flashing program to the board, on the console it says,

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The target endianness is set automatically (currently little endian)

continue

Continuing.

Note: automatically using hardware breakpoints for read-only addresses.

Temporary breakpoint 1, main () at ../Sources/main.c:58

58      PE_low_level_init();                            //End of Processor Expert internal initialization.

Quit (expect signal SIGINT when the program is resumed)

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I have no idea why it generates Temporary breakpoint 1.

First I thought it might be watchdog timer but loop is so small as you can see on the code below and beside I haven't added watchdog timer yet. Looking forward to have your comments.

Thanks,

     pos.x = 0;

     pos.y = 0;

     pos.page = 0;

    DVS_CS1_ClrVal(NULL);                        // Unselect CS1

    DVS_CS2_SetVal(NULL);                        // Select CS2

    DVS_WriteByte(DVS_ON, DVS_Ins);                // Power on

    for (uint8_t i=0; i<8; i++)           *******This is where main program calls __thumb_startuo(void) function only if it runs continuously but trying step by step, (F5) it works fine and comes out of the "for" loop.

    {

        DVS_Fill(CLEAR,0,2,i);                // Clear Display, Dec23 127-> 2 for test

    }

    DVS_GotoXY(0,0);

void DVS_Fill(uint8_t mode, uint8_t x1, uint8_t x2, uint8_t Row)

{

    uint8_t pi;

    for(pi=x1; pi<x2+1; pi++)           *******Same as above if you pass that loop with F5 it will call __thumb_startuo(void) function here. That only if it runs continuously but trying step by step, (F5) it works fine and comes out of the "for" loop.              

    {

            DVS_GotoXP(pi, Row);

            DVS_WriteByte(mode, DVS_Data);          

    }

}

0 Kudos