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.

Adding CLA to TI-RTOS project in 28075. Linker.cmd problem.

Other Parts Discussed in Thread: CONTROLSUITE, TMS320F28075

Hi.  I'm working with the 28075 controlCard, using CCsv6.1.0.  I have successfully done a project out of controlSuite that blinks the LED using SWIs.  I even added TASKs, and did all of the execution tracking using loggingSetup, and I know that everything is working fine.

Independently, I got the cla_adc_fir32_cpu01 project working, verified that the analog signal that I jumpered over from EPWM2A (pin 53) into ADCA0 (pin 9) is being read in to the ADC, and I see the filtered values after the computation is done in the CLA.  Works great.

Now, I want to add CLA functionality (along with ADC and EPWM functionalities) to my TI-RTOS project.  So, I started copying/pasting the cla_adc_fir32 project components into my TI-RTOS project.  It took me a while, but I got all of my bases covered and it compiles.  But, when I try to link it, I get some strange errors.  First, I am now using the 2807x_FLASH_CLA_lnk_cpu1.cmd file out of controlSuite/device_support/F2807x/v150/F2807x_common/cmd/    I needed to change the size of some of the memory sectors to fit in my project, but all the errors have gone away.  Now the only error that it is complaining about is in linker.cmd.  It says .flashfuncs can't be put into any of its memory sectors, because they are all NULL.  The comment headers in this file say that it is automatically generated, so it's obvious that I can't just fix it.  I need to know what is being used by CCS to populate this file (and why it's used).  The original cla_adc_fir32 project doesn't even seem to have a linker.cmd file that I can find, so what is going on here?

Any help is appreciated.

-Justin

  • Hi,

    This forum is for issues with keystone devices its peripherals as well as any SDK used on keystone platforms, including:
    1. MCSDK (Multicore Software Development Kit)
    2. Desktop Linux SDK
    3. MCSDK Video

    Please provide the below information
    Have you using keystone devices for your testing?(Ex: C667x, C665x).
    Have you reffer any TI provided documents? If yes, share the information.

    Thanks,
  • Ganapathi, I posted in the wrong forum, my mistake. How do I move it to the TI-RTOS forum, or should I just start a new thread in that forum? -Justin
  • Justin,

    I will move this thread to the TI-RTOS for you.

    Regards,

    Sem Amesawu
  • Justin,

    You said "It says .flashfuncs can't be put into any of its memory sectors, because they are all NULL".

    What do you mean by "they are all NULL"? What is all NULL (The .flashfuncs section)? If .flashfuncs is NULL can you try removing its placement in the linker?

    You said "The comment headers in this file say that it is automatically generated".

    What file are you speaking of? and what do you mean by "it is automatically generated"? Are you speaking of the .flashfunc section is automatically generated? If that is that case and its NULL, maybe nothing is being generated into that section?


    You said " I need to know what is being used by CCS to populate this file (and why it's used)".
    Are you talking about the linker command file (*.cmd)? This file contains all the outpust sections from your program.

    The original cla_adc_fir32 project does have a linker command file...Look in the C2000 linker options. They are including it as part of the search and not in the CCS project itself. Its using "2807x_RAM_CLA_lnk_cpu1.cmd" and "F2807x_Headers_nonBIOS.cmd".

    Judah
  • Judah,

    You ask very good questions, and I think it quickly becomes obvious that I don't truly understand the difference between the different .cmd files.

    That being said, I went back and started over with my virgin TI-RTOS project, and began adding the "extra" components of the 28075_FLASH_CLA_lnk_cpu1.cmd file INTO MY EXISTING TMS320F28075.cmd file that was part of the TI-RTOS project.  This way, I never actually added the 28075_FLASH_CLA_lnk_cpu1.cmd file into the project, I just took lines out of it and put them into my existing .cmd file.  In doing that, I needed to massage a few things to make the new components fit, but I got it to compile/link.  That was without any of the additional C or .h files from the CLA_ADC_FIR32 project.  Then, once I had the .cmd file upgraded to accept the new functions from the CLA_ADC_FIR32 project, I started adding .c, .h, and .asm files.  Now I've got it compiling and loaded into the 28075.  I haven't changed any of the CLA_ADC_FIR32 C code yet to make it play nice with the RTOS, but it is all in there.  That was where I left it at 5pm when I left work on Friday.  

    To go back into what I was saying in the previous post... the linker.cmd file had a comment header that said it was automatically generated and therefore you should not modify it, since it will be overwritten at build-time.  There was a very short SECTIONS section that had .flashfuncs allocation statement.  But, there was no MEMORY section in this file.  I assume that is why it was claiming the memory sectors (in the .flashfuncs allocation statement) were NULL.  Because there were no MEMORY declarations in that linker.cmd file.  And since it was automatically generated, I was trying to figure out what was generating it, so I could try to fix the problem upstream.  Not really worth going down that path though, since I seem to have circumvented that problem.  If you're interested in knowing what the file was, I will post it here on Monday when I get back to work.

    Thank you for getting back to me so quickly, but I think I've solved this problem.

    -Justin

  • Justin,

    Okay, I know what the generated "linker.cmd" file you are talking about it now.  It is generated from your configuration (*.cfg) file.  Yes, you don't want to touch this file or mess with it as it is generated based upon your configuration.  You are correct when you say "there were no MEMORY declarations" in this linker.cmd file and that is because all Memory declarations should come from the linker command file that you included in your project.  We only generate symbols and links to object files that TIRTOS requires.

    Thanks for the clarification!

    Judah