Porting to TMS320F280039c (C28x core from Texas )

Hi Everybody.

I have succesfully used this port ( github.com/IvanZuy/freertos_c28x) on the TMS320F28035 and now I am trying to use it on the new TMS320F280039c. But, sometimes the scheduler doens’t starts ok, it crashes. I am using static allocation and I found that forcing the task stacks and buffers to align goes better but it doesn’t fix the problem at all and it still crashes. Texas has changed the application builder to EABI, I suppose that something in the assembler routine works different and that is why it crashes, but I don’t know exactly what can I try or look at. it would be very helpful if someone could give me help to find a solution.

Regards

This is a migration guide

I don’t know anything about that port but…

  • If it runs sometimes and crashes sometimes, then a change in ABI is unlikely to be the cause, as if it were the crashes would be consistent and always in the same place.

  • How are you determining the scheduler doesn’t start on occasion that it crashes? How do you know its not starting and the crash actually happens in a task?

  • What are the differences between the TMS320F28035 and TMS320F280039c that the scheduler would care about (more registers? different interrupt mechanism?)

Hi Richard,

First of all, thanks for your help. I will start from the end to the begining.

The main difference between both, is that the TMS320F280039c has FPU, thus it has more registers. But this difference is taken into account in the code and for example works in the TMS320F280049c that is very similar to the new one.( with the old compiler at least)

I am using the debugger and going step by step. The crash occurs at the exit of portRESTORE_FIRST_CONTEXT, it jumps to illegal execution

Texas changed from COFF to EABI, ( C2000_c28x_migration_from_coff_to_eabi ), In my opinion ,it seems that there is some assumption in assembler code that is no longer valid. It seems that some value is not properly restored and depending the random value, it starts or crashes. But I don’t have enough knowledge to find the exact problem and the solution

Regards,
Fernando