Hello,
I use in my project rx63t controller, Renesas RX toolchain compiler (v2.04.01).
Without any error, the program gets stuck in " void Excep_UndefinedInst(void){/* brk(); */} "?
Any suggestions?
Best regards.
Arezki
This is usually an indication that the program has run off into the weeds. Make sure there is enough stack. The defaults for the project builder give you 256 bytes user and 768 for the interrupt stack. If you have large local data structures you can overrun that. Try increasing the user stack by editing stacksct.h.
As Dale indicates, the CPU tried to execute a non existing instruction code. This means the PC was at a bad place in memory, typically stack problem, or code was not programmed to expected location (linking issue). Could also be an interrupt that occurred for which there was no interrupt handler. A good idea is to populate all interrupts with a defaultInterrruptHandler() so that you at least catch and handle that.Most IDEs have a setting to add this, so you don't have to do it by hand.
Hi,
Thank you for your responses,
At first, I regenerated the default files of the 'interrupt_handlers.c, vect.h and vector_table' by creating a new project, then discarting all interrupts.
Knowing that I use rx63t 'R5F563T4' --> 32KBytes, I noted that I exceed the user stack limit !, how can I edit stacksct.h for increasing stack, because I tried with '#pragma stacksize su' without issue ?
Thank you in advance for your collaboration.
What IDE are you using?
e2 studio . Version: 5.2.0.020 ,
Renesas RX toolchain compiler (v2.04.01)
For the Renesas compiler you set stack size with
#pragma stacksize su=0x400
and
#pragma stacksize si=0x100
Observe that under Compiler=>Miscellaneous there is a checkbox for detecting stack overflow.
Hi Carl,
- Trying with above values, I get the same phenomenon!
- Actually, Compiler-> Miscellaneous detect a stack overflow...
- "#pragma stacksize su=0x400" : Is this the high level value of #pragma stacksize su?
Have a good night.
Best regards
Hi Carl & Dale,
My problem is solved, the code was not programmed to expected location (linking issue), so for my controller I adjust the location in e2studio: properties->settings->linker->section->PResetPRG.
Thank you for your collaboration.
Best regards,
:-)