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.

Compiler: F28335 simulator, rts2800_fpu32_fast_supplement.lib and atan2 function

Tool/software: TI C/C++ Compiler

Hi,

I know that simulator of F28335 is not officially supported but I am asking the question if someone had the same issue that I am facing but that found the solution.

I am using "simulator" of the F28335 to check first some processing without the need to be connected to a F28335 target.

I am also using the fast library: rts2800_fpu32_fast_supplement.lib.

When I call the function atan2 it works on the real target but not with the simulator (result is always 0).

To make it work on the simulator I have to remove the fast library.

Did you have already this issue?

Thanks for your support

Regards,

Mathieu

  • Mathieu,
    From the documentation I see it looks like the "Fast" version by default uses some functions embedded in the ROM of the F28335. There is an option to copy those from ROM to SARAM for best performance on a real device.

    For the case of the simulator you may need to fill the "ROM" addresses with this information for the fast rts to work properly? You may have to redefine the memory map so it will let you write to those addresses, etc.

    Best,
    Matthew
  • Thanks a lot Matthew for your quick answer.
    I checked and indeed the ROM location is not filled when I am with the simulator environment.
    Do you have the solution to initialize this simulator memory area with the values present in the ROM of the F28335 device?
    Thanks in advance
    Mathieu
  • Mathieu,

    I looked at the GEL file that defined the memory regions for the simulator; the ROM space is already write enabled for simulation purposes so you should be able to write to it without modification.

    There are 2 paths to get the ROM code loaded into the simulation:

    1)Download the ROM source listing/PJT from here http://www-s.ti.com/sc/techlit/spru963.zip You can either add the ROM pjt as a dependent project or build and load separately.  I think you will need to touch the .cmd file to change the ROM address from "NOLOAD" to normal.

    2)If you have a physical 28335 you can do a memory save from CCS on the ROM addresses 0x3FE000-0x3FFFFF and then on the simulator do a memory load to the same addresses.

    Since you are using the simulator, and the ROM is open source, I have attached the .dat file with the info for #2 to speed things up for you.  I believe this should be the latest revision of the ROM, but please let me know if you have issues.

    Best,
    Matthew28335 ROM reference.dat

  • Hello Matthew,

    It is perfect!!! it works now.

    Thanks a lot.

    Mathieu