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.
Tool/software: Code Composer Studio
Hello,
We are creating a CLPRU based firmware project via command line using PRU compiler version 2.1.4. In the generated project we face a build error since PRU Linker Runtime environment Initialization model is set to 'Link using ROM autoinitialization model' by default. The flag --rom_model is enabled.
We would like to know if there is a commad line option to disable the Initailization model (to change the value to empty in the generated project)
Please let us know if any additional details are needed
I'm confused. You say ...
Nijin P said:We are creating a CLPRU based firmware project via command line
But your question strongly suggests you build with CCS (Code Composer Studio). For right now, I presume you build with CCS.
Nijin P said:We would like to know if there is a commad line option to disable the Initailization model
You can link without specifying either of the --rom_model or --ram_model options. This is valid only for a program which contains no C code, and only hand-coded assembly. In CCS, the drop-down box for Initialization Model has three entries. One of them is simply blank. Choose that one.
Thanks and regards,
-George
Hello George,
Thank you for your response. Actually, we want to do the project creation and build via command line only without using CCS GUI. After getting the build errors in terminal, we tried troubleshooting the created project settings by importing to CCS GUI.
We are not specifying the linker option '--rom_model' anywhere while creating the project via command line. Still it is getting enabled in the created project and 'Initialization model' drop down box is showing 'Link using ROM autoinitialization model'. If we select the blank option manually in CCS GUI, build error is resolved.
So we want to know to why the ROM autoinitialization model is getting enabled by default in the created project and would like to disable it command line itself.
Regards,
Nijin P
Nijin P said:Actually, we want to do the project creation and build via command line only without using CCS GUI. After getting the build errors in terminal, we tried troubleshooting the created project settings by importing to CCS GUI.
Please forgive me, but I still don't understand. When you say "build via command line", I presume you use make (or something similar) to invoke the compiler shell clpru. In that case, compiler options typically appear as assignments to variables in the makefile. There is no method to automatically import such a build into CCS. (Though it is possible to configure a CCS project to use your custom makefile to perform the build.) So please describe, in detail, how you intend your project to build, and exactly how you import that into CCS.
Nijin P said:So we want to know to why the ROM autoinitialization model is getting enabled by default in the created project and would like to disable it command line itself.
I still don't understand the nature of your created project, so I cannot answer. Speaking generally, not using either --ram_model or --rom_model will solve your problem.
One other detail to watch for ... Make sure your linker command file does not contain --ram_model (or the older short equivalent -cr) or --rom_model (or the older short equivalent -c).
Thanks and regards,
-George
Hello George,
George Mock said:You can link without specifying either of the --rom_model or --ram_model options
I think --rom_model is getting enabled by default in the project created over command line.
I confirmed that if I add -ccs.setLinkerOptions "--ram_model" @configurations PRU0_IRT in the arguments, the drop down box for initialization model shows 'Link using RAM autoinitialization model' (third entry)
If I add -ccs.setLinkerOptions "--rom_model" @configurations PRU0_IRT in arguments, the second entry in the drop down box is enabled.
But the problem is that when I am not specifying anything (deleted the above mentioned linker option in the args list), 'Link using ROM autoinitialization model' (second entry) is enabled in the created project. How to avoid this to get a command line created project with empty value for the initialization model
George Mock said:One of them is simply blank. Choose that one.
We cant open CCS GUI to edit the project settings during the nightly build since the build is happening over command line.
Nijin P said:But the problem is that when I am not specifying anything (deleted the above mentioned linker option in the args list), 'Link using ROM autoinitialization model' (second entry) is enabled in the created project. How to avoid this to get a command line created project with empty value for the initialization model
Nijin,
Some default compiler and linker options (depending on the device selected) are always added to any new CCS project. This is done behind the scenes by the CCS project interface. The --rom_model is one of those linker options that is added to all C projects. You can confirm this by creating an empty project using the CCS GUI as well.
The only time this option is not added is if you select the "Empty Assembly-only Project" template. With this template, that option is set to blank. So you could use the workaround of creating the new project with this template. The option to specify a template with command line projectCreate is -ccs.template <id>. Please see this link for details.
Note that with the "Empty Assembly-only Project" template a few other default options are different as well. Ones that I noticed were the --stack_size and --heap_size options. But these can be changed using the -ccs.setLinkerOptions.
Let us know if this helps.