This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-F28379D: _system_post_cinit() 0x3FE493 (an error occurred: failed to parse the previous frame FP)

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: BOOSTXL-DRV8323RS

Hello, 

I am using LAUNCHXL-F28379D.

I want to embed my program in Flash memory. And the compile error code said the memory does not fit into the .cinit.

so I modified the memory location of .text(which is long and at first it was located in FLASHB with .cinit)

This link was my previous FAQ.

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1192717/launchxl-f28379d-cinit-flash-memory-issue-error-code-10099-d/4501093#4501093

Then the compiler error code disappeared. But when I tried to play on the device there was a new error code in the debug window.

1. I am not using watchdog

2. My project is cplusplus project.(I guess this should be the problem.)

3. I don't know where the error stems from..(Memory location or My project is crashing somewhere)

  • For more details,

    there are 3 yellow alerts on Stack Usage.

    It says "Makes indirect calls".

  • Hi Jungwoo,

    Have you tried increasing the stack size in the project properties? I'm going to see if someone else on the team has some suggestions as well.

    Best,

    Kevin

  • Hello Kevin,

    I never tried to increase the stack size!

    I will try and reply about it.

    Thanks!!!

    Sincerely,

    Jungwoo

  • I did increased the stack size in the linker cmd.

    I reached to SECTIONS and modified the .stack location with the bigger memory.(I combined the RAM sections. ex) RAMGS0_1_2 :origin = 0x00C000, length = 0x003000)

    But the same error came out in debug window and the yellow alert in stack usage.

    In the Stack Usage, it says

    "Makes indirect calls"

    and also 240 out of  240bytes.

    Is it possible to modify the maximum Inclusive size(240bytes)?

    I need 8bytes more

  • Do you have lot of variables on stack. You may want to put them in separate memory?

  • Hello Santosh

    Yes, I just want the project run properly.

    I would be happy if its possible.

    Sincerely, Jungwoo

  • Will you be able to share your code? We can take a look? 

    You may want to put the variables in separate memory in different memory section

  • Sure!

    It's quite long project.

  • I did not see too many variables in stack. Was there any code stage where it was working?

    Can you step through the code and narrow it down? May be comment some of the functions.

  • Hello, Santosh

    main.cpp line 58:

    PositionSensorAM5147 spi(16384, 0.0, NPP);

    had a bug and I had fixed so I guess it worked at least line 58 in main.cpp

    For more details about my code, comments are below.

    This project is about bldc motor control.(Launchxl-f28379d + motor driver (Boostxl-DRV8323RS from TI) + encoder(AS5147P from AMS))

    Summary of my code:

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

    1. Main function

    Configuring mode and initializing parameters of Motor Driver(it communicates with SPI)(functions are located in DRVjw.h)

    2. Timer ISR starts(infinite Loop)

    SPI communication(receive Encoder angle value)+ADC(ADC command in timerISR which is located in main.cpp)(measure the current value from Motor Driver external pin) >

    Calculation(foc.h) >

    ePWM(modify the compare value of ePWM, commutate() function in foc.h) > back to ADC

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

    3. CAN communication Interrupt

    Command (Position, Velocity, Gain and Torque command) receive

    4. Serial communication Interrupt

    Command (Mode command) receive

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

     Thanks for the notice that this is not a variable memory problem, I am searching for another problem... 

    Sincerely,

    Jungwoo

  • Hi,

    I am not familiar with your code, so I cannot comment. But your debug is going in right direction and you should be able to narrow it down.

    Regards, Santosh

  • Hello, Santosh

    Thank you for leading me to right direction!

    I have to make my code simple and find what the problem is.

    Thank you!

    Sincerely,

    Jungwoo

  • I fixed my bug.

    The problem was that I made a function that returns Trash value(I only declared the variable and never initialized)

    Thank you