cameron 2 Posted November 16, 2016 Share Posted November 16, 2016 The CC1310 board option in Energia assumes that I am using the CC1310 Launchpad. The launchpad uses the CC1310F128RGZ, but I actually am using the CC1310F64RHBT. This means that the board is assuming it has more flash and RAM than it actually does. I want to edit the boards.txt file to match with the specs of my chip but I cannot find the correct numbers for my chip. There is also an issue with the pin mapping, because the F128RGZ has 48 pins while the F64RHBT has 32. Here the boards.txt for the CC1310 launchpad that needs to be adapted for the CC1310F64RHBT: menu.cpu=ProcessorLAUNCHXL_CC1310.vid.0=0x2341LAUNCHXL_CC1310.pid.0=0x0c9fLAUNCHXL_CC1310.name=LaunchPad w/ cc13xx EMT (48MHz)LAUNCHXL_CC1310.upload.maximum_size=16384LAUNCHXL_CC1310.upload.maximum_ram_size=2560LAUNCHXL_CC1310.build.mcu=cortex-m3LAUNCHXL_CC1310.build.f_cpu=48000000LLAUNCHXL_CC1310.build.core=cc13xxLAUNCHXL_CC1310.build.variant=LAUNCHXL_CC1310LAUNCHXL_CC1310.build.board=LAUNCHXL_CC1310LAUNCHXL_CC1310.build.ldscript=ti/runtime/wiring/cc13xx/linker.cmdLAUNCHXL_CC1310.upload.tool=dsliteLAUNCHXL_CC1310.upload.protocol=dsliteLAUNCHXL_CC1310.upload.maximum_size=131072LAUNCHXL_CC1310.upload.maximum_data_size=8192 If anyone could help me adapt my boards.txt file or let me know where I can get these numbers, let me know. I have tried inputting 64kb for flash and the other appropriate values, but it didn't work because I assume the values have to line up perfectly with the chip's memory sectors and the memory map. Thanks, Cameron Quote Link to post Share on other sites
Rei Vilo 695 Posted November 16, 2016 Share Posted November 16, 2016 Why is that post duplicated with http://forum.43oh.com/topic/10029-how-to-program-a-cc1310f64rhbt-in-energia/? Quote Link to post Share on other sites
cameron 2 Posted November 16, 2016 Author Share Posted November 16, 2016 Not sure. That link is broken now. Quote Link to post Share on other sites
jpnorair 340 Posted November 16, 2016 Share Posted November 16, 2016 I'm not familiar with Energia, but you'll need to change the linker file for the appropriate one, and you can easily change 131072 to 65536. If you don't have the linker file, I can send you one that comes from TI-RTOS. It probably works. Quote Link to post Share on other sites
cameron 2 Posted November 16, 2016 Author Share Posted November 16, 2016 If you could send me the linker file that would be great. Quote Link to post Share on other sites
jpnorair 340 Posted November 17, 2016 Share Posted November 17, 2016 Here is the package of 64KB linker files from the TI-RTOS distro. Give these a try. Most likely you want the .cmd variant. CC13xx-64KB-linker.zip Quote Link to post Share on other sites
cameron 2 Posted November 18, 2016 Author Share Posted November 18, 2016 Where would I place this linker file? Quote Link to post Share on other sites
jpnorair 340 Posted November 18, 2016 Share Posted November 18, 2016 Where would I place this linker file? On some path that Energia config script finds. Looks like you can change this path (see below). Maybe just call it linker-64KB.cmd and toss it in the same directory -- up to you. LAUNCHXL_CC1310.build.ldscript=ti/runtime/wiring/cc13xx/linker.cmd Quote Link to post Share on other sites
cameron 2 Posted November 23, 2016 Author Share Posted November 23, 2016 Here is the package of 64KB linker files from the TI-RTOS distro. Give these a try. Most likely you want the .cmd variant. On some path that Energia config script finds. Looks like you can change this path (see below). Maybe just call it linker-64KB.cmd and toss it in the same directory -- up to you. LAUNCHXL_CC1310.build.ldscript=ti/runtime/wiring/cc13xx/linker.cmd I have tried this. It yields the error which can be found at this gist: https://gist.github.com/cameronus/5abd654d14445c8dc76f9665d14463c1 Any help would be greatly appreciated as I have still not been able to program my chip. Thanks, Cameron Quote Link to post Share on other sites
jpnorair 340 Posted November 23, 2016 Share Posted November 23, 2016 Do a comparison of the two linker files: the one from the Energia distribution and the one from the TI-RTOS distro (I attached this one). 1. Do quick visual inspection. 2. Run a diff on the files if they are mostly similar. Filemerge is on OS X, there are others on Linux and Windows. You should learn how to use diff in any case. Quote Link to post Share on other sites
cameron 2 Posted November 26, 2016 Author Share Posted November 26, 2016 @@jpnorair I don't think you sent the correct files. They are completely and entirely different. Here is a gist for the linker you sent: https://gist.github.com/cameronus/dfb95b369ac8d6aa5885458d8dbe512d (I removed the comment header to keep it shorter), and here is the one found in the Energia CC1310 Launchpad files: https://gist.github.com/cameronus/ee26a3e9df5565adcd2fabf48e7cf80f. If you could please help, I would appreciate it. Quote Link to post Share on other sites
cameron 2 Posted November 28, 2016 Author Share Posted November 28, 2016 @@jpnorair I have done more research and have not been able to figure out why these files are so different. Do you have any ideas? Quote Link to post Share on other sites
jpnorair 340 Posted November 28, 2016 Share Posted November 28, 2016 TI-RTOS is such a mess. The files are different because some people go out of their way to try to hook-up everything in a build interdependently rather than to have some redundancies, and you're suffering because you don't know much about building code. Sorry about that, but it's not my doing. Try looking at the file included in your linker command. INCLUDE "ti/platforms/emt13xx//include_gnu/CC1310.lds" You need to change the memory areas from 128KB to 64KB. I'm not going to do this for you, and it might be a journey for you that takes some time to figure out (for the first time). Another option is to replace your 64KB chip with a 128KB chip. Assuming you know what you're doing and have a hot-air rework kit, that's a 30 minute job, max. Assuming you don't want to do this, I recommend taking a look at the "memory map" section of the CC1310 Technical Reference Manual to make sure all your sections are declared properly. Welcome to embedded! Quote Link to post Share on other sites
spirilis 1,265 Posted November 28, 2016 Share Posted November 28, 2016 I personally won't touch anything other than the F128 model. I think it was a mistake for TI to produce them (especially the CC1310F32, like, wtf?)... with the RTOS being an integral part of the solution. Quote Link to post Share on other sites
cameron 2 Posted November 28, 2016 Author Share Posted November 28, 2016 @@spirilis @@jpnorair I could move to the F128 for prototyping, but I have already spent way way too much money on proto-advantage SMT to DIP adapters. I most likely will put the 128 in my final design and just stick with the F64 for prototyping. At least I know the chip will work on the final product. I have gone through and fixed about 7 errors now by renaming files changing flash size values and creating configurations. Now I am stuck on this, when I upload I get this error: "/Users/cameron/Library/Energia15/packages/energia/tools/arm-none-eabi-gcc/4.8.4-20140725/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld:/Applications/Energia.app/Contents/Java/hardware/cc13xx/ion/cores/cc13xx/ti/runtime/wiring/cc13xx/linker.cmd:39: warning: memory region `REGION_TEXT' not declared/Users/cameron/Library/Energia15/packages/energia/tools/arm-none-eabi-gcc/4.8.4-20140725/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld:/Applications/Energia.app/Contents/Java/hardware/cc13xx/ion/cores/cc13xx/ti/runtime/wiring/cc13xx/linker.cmd:39: warning: memory region `REGION_DATA' not declared /Applications/Energia.app/Contents/Java/hardware/cc13xx/ion/cores/cc13xx/ti/runtime/wiring/cc13xx/linker.cmd:39: undefined symbol `__data_start__' referenced in expression collect2: error: ld returned 1 exit status exit status 1 Error compiling for board Ion. I don't get why it can't find these regions as I have not deleted anything that I know of. Any ideas? I also agree, 32kb, with RTOS, wtf? Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.