COMPILATION PROBLEM

Hello everybody, I have a question. I am trying to compile a block but I get an error in de console. I think (not sure) it is because my DSP is running out of memory but I would like somebody confirms it or give me some advice about how to solve it.

I think is a memory problem because when I compile the block "compound" or the block "ensayo4" I don't have problems, but when I joint them in EKF I get the error.

I attach the block diagram and also a .txt file with the error details.

Thanks for your answers.

Best regards,

Danilo

I don't understand you at

I don't understand you at all... When I compile my block I have to enable the Target FLASH checkbox sure? I did it and now I don't have errors. But I don't understand the line about "burn the flash from Code Composer" Could you explain me a little bit more please. Thanks for all.

1) We were able to compile

1) We were able to compile your file no problem, so you must have attached the wrong file.
2) Your error log contained a linker error like so:

lib\F2808lnk.cmd", line 105: error: placement fails for object ".econst", size 0x202 (page 0).
Available ranges:  PL0L1RAM   size: 0x3000   unused: 0xb4     max hole: 0xb4

This means that your code + data can not fit in RAM. The memory on the F28x series of chips consists of both RAM and flash. Flash is a special memory that can be written using a special utility. Once written, flash retains the data even after power is removed and reapplied. This post describes how to write a VisSim generated .out file to flash.

Hello again, now I compile

Hello again, now I compile the program and download to the DSP (F2808), but my program doesn't work yet.

Let me explain a little. The program generates PWM outputs (as control inputs I have frequency and amplitude) and also adquire analog inputs. With the analog inputs the program perform some calculations and shows the results in VISSIM windows. I don't get any error, but It looks like the program doesn't execute PWM generation because the power interface doesn't work. I tried only the data acquisition block and the PWM generation block alone and work well, but when I joint them it looks like PWM is not working. Do you have any idea which is the problem and how can I solve it? because I have no idea since there is no error It just doesn't work together.

The problem is that you want

The problem is that you want to sample your control at 5 kHz and you have a lot of floating point matrix operations and you are trying to run on a 100 MHz fixed-point CPU. We tried your control on a floating point 150 MHz F28335 and it can only sample at 3 kHz tops. You will have to do one or more of the following:

  1. Use a faster floating point CPU like 300 MHz F28345
  2. Sample at a slower rate
  3. Simplify your algorithm

Could it help if I do all

Could it help if I do all matrix operation in fixed point? I mean for example if I program all the matrix operations as scalar multiplications and sums and avoid using matrix multiplication blocks??? because I can't simplify my algorithm

It would certainly help you

It would certainly help you on a fixed point processor like the F2808. I doubt that alone will get you to 5 KHz rate. You need to do some clever restructuring of your algorithm. I see a lot of zeros going in to some source matricies. (8 of 12 entries for B are zero) If you can exploit that and avoid needless multiplies and adds, that could get you there.

Hello everybody, I attach the

Hello everybody, I attach the block (EFK) again. I can't compile it. I'm using a DSP F2808 by TI

I just notice if I select the option Minimize RAM Usage there is no error during compilation. Could this change affect the performance of the device during operation?

Also If I select Target FLASH there is no error. In case I use Target FLASH I have to follow the instructions detailed in your last link?

Thanks for your answers and help

I just figured out that the

I just figured out that the problem appears when I write the ePWM outputs in the DSP. Before writing them there is no problem

Now i attach the block

Now i attach the block diagram

The attached diagram compiles

The attached diagram compiles fine for us. Looking at your error log, it appears that you are running out of memory. You will need to enable flash targeting which will place your code and text in flash memory freeing RAM for your data. You will need to burn the flash from Code Composer, then you can debug from VisSim.

I don't understand you at

I don't understand you at all... When I compile my block I have to enable the Target FLASH checkbox sure? I did it and now I don't have errors. But I don't understand the line about "burn the flash from Code Composer" Could you explain me a little bit more please. Thanks for all.