I am trying to link Driver library with SYSBIOS. I have created a SYSBIOS project with given minimal template and modified the main.c file and .cfg file as per my requirement.
In project properties, I have set include path as MSP430ware path and added driverlib.lib in "File Search path".
and In Processor options, I have set Data memory model = large.
after that, I build the project and getting error that driverlib needs large data memory model but restricted large data memory model is provided.
I checked makefile (Path: <project>/Debug/makefile) and found that --data_model = large. It is proper.
I checked makefile (Path: <project>/src/sysbios/makefile) and found that --data_model = restricted is there even though i have set large data memory model in processor option. I replaced "restricted" with "large" and save & Build again.
After building, In makefile(Path: <project>/src/sysbios/makefile) --data_model = restricted was there even though i have replaced it with "large".
In Conclusion, "--data_model = restricted" comes by default even if i set it as large. What will be the problem for that? and How to solve Data memory model error.
I have added compilation output here
**** Build of configuration Debug for project sysbios_memory_model_issue3 ****
/opt/ti/ccsv5/utils/bin/gmake -k all
making ../src/sysbios.a430X ...
cl430X /opt/ti/bios_6_34_02_18/packages/ti/sysbios/BIOS.c ...
asm430X /opt/ti/bios_6_34_02_18/packages/ti/sysbios/family/msp430/TaskSupport_asm.asm ...
asm430X /opt/ti/bios_6_34_02_18/packages/ti/sysbios/family/msp430/Hwi_switch_asm.asm ...
ar430X BIOS.obj msp430_TaskSupport_asm.obj msp430_Hwi_switch_asm.obj ...
Building file: ../app.cfg
Invoking: XDCtools
"/opt/ti/xdctools_3_24_05_48/xs" --xdcpath="/opt/ti/bios_6_34_02_18/packages;/opt/ti/ccsv5/ccs_base/msp430/msp430ware_1_25_00_30/packages;/opt/ti/ccsv5/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.msp430.MSP430X -p ti.platforms.msp430:MSP430F5438 -r release -c "/opt/ti/ccsv5/tools/compiler/msp430_4.1.2" --compileOptions "-g --optimize_with_debug" "../app.cfg"
making package.mak (because of package.bld) ...
generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
configuring app.x430X from package/cfg/app_p430X.cfg ...
warning: ti.sysbios.BIOS: "/opt/ti/bios_6_34_02_18/packages/ti/sysbios/BIOS.xs", line 195: ti.targets.msp430.MSP430X : Support for the MSP430 COFF targets will be eliminated in future SYS/BIOS releases. Please switch to building with the corresponding ti.targets.msp430.elf MSP430 target.
generating custom ti.sysbios library makefile ...
generating custom ti.sysbios.family.msp430 Hwi stubs ...
Starting build of library sources ...
making /root/workspace/sysbios_memory_model_issue3/src/sysbios.a430X ...
Build of libraries done.
cl430X package/cfg/app_p430X.c ...
Finished building: ../app.cfg
Building file: ../main.c
Invoking: MSP430 Compiler
"/opt/ti/ccsv5/tools/compiler/msp430_4.1.2/bin/cl430" -vmspx --abi=coffabi --data_model=large -g --include_path="/opt/ti/ccsv5/ccs_base/msp430/include" --include_path="/opt/ti/ccsv5/ccs_base/msp430/msp430ware_1_25_00_30" --include_path="/opt/ti/ccsv5/tools/compiler/msp430_4.1.2/include" --advice:power=all --define=__MSP430F5438__ --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU15 --silicon_errata=CPU18 --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=minimal --preproc_with_compile --preproc_dependency="main.pp" --cmd_file="./configPkg/compiler.opt" "../main.c"
"../main.c", line 54: remark #1530-D: (ULP 5.1) Detected modulo operation(s). Recommend moving them to RAM during run time or not using as these are processing/power intensive
"../main.c", line 67: remark #1530-D: (ULP 5.1) Detected modulo operation(s). Recommend moving them to RAM during run time or not using as these are processing/power intensive
Finished building: ../main.c
Building target: sysbios_memory_model_issue3.out
Invoking: MSP430 Linker
"/opt/ti/ccsv5/tools/compiler/msp430_4.1.2/bin/cl430" -vmspx --abi=coffabi --data_model=large -g --advice:power=all --define=__MSP430F5438__ --diag_warning=225 --display_error_number --diag_wrap=off --silicon_errata=CPU15 --silicon_errata=CPU18 --silicon_errata=CPU21 --silicon_errata=CPU22 --silicon_errata=CPU23 --silicon_errata=CPU40 --printf_support=minimal -z --stack_size=160 -m"sysbios_memory_model_issue3.map" --heap_size=160 --use_hw_mpy=F5 -i"/opt/ti/ccsv5/ccs_base/msp430/include" -i"/opt/ti/ccsv5/tools/compiler/msp430_4.1.2/lib" -i"/opt/ti/ccsv5/tools/compiler/msp430_4.1.2/include" --reread_libs --warn_sections --display_error_number --diag_wrap=off --rom_model -o "sysbios_memory_model_issue3.out" -l"./configPkg/linker.cmd" "./main.obj" -l"libc.a" -l/opt/ti/ccsv5/ccs_base/msp430/msp430ware_1_25_00_30/driverlib/5xx_6xx/CCS/driverlib.lib "../lnk_msp430f5438.cmd"
<Linking>
error #16019-D: file "/opt/ti/ccsv5/ccs_base/msp430/msp430ware_1_25_00_30/driverlib/5xx_6xx/CCS/driverlib.lib<gpio.o>" specifies large data memory model, which is not compatible with restricted large data memory model specified in a previous file or on the command line
error #16019-D: file "/opt/ti/ccsv5/ccs_base/msp430/msp430ware_1_25_00_30/driverlib/5xx_6xx/CCS/driverlib.lib<wdt.o>" specifies large data memory model, which is not compatible with restricted large data memory model specified in a previous file or on the command line
error #10010: errors encountered during linking; "sysbios_memory_model_issue3.out" not built
remark #10372-D: (ULP 4.1) Detected uninitialized Port A in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
remark #10372-D: (ULP 4.1) Detected uninitialized Port B in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
remark #10372-D: (ULP 4.1) Detected uninitialized Port C in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
remark #10372-D: (ULP 4.1) Detected uninitialized Port D in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
remark #10372-D: (ULP 4.1) Detected uninitialized Port E in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
remark #10372-D: (ULP 4.1) Detected uninitialized Port F in this project. Recommend initializing all unused ports to eliminate wasted current consumption on unused pins.
>> Compilation failure
gmake: *** [sysbios_memory_model_issue3.out] Error 1
gmake: Target `all' not remade because of errors.
**** Build Finished ****