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.
Apparently Code Composer Studio is not as friendly as I hoped to those who wish to use Assembly Language on the MSP-EXP430F5529LP. I simply made a new assembly project for the MSP430F5529 in code composer studio (included below) and attempted to build it. It gives a warning that there is no entry point defined. I modified the linker settings so that there is a command line argument --entry-point=RESET, and the warning went away. When trying to debug it, I get an error that there is no source available for 0x0 in a C file, but I'm not using C. I go to the debug perspective and look at the Disassembly Window and find my program at 0x10000 just fine, but the program doesn't seem to be set up correctly to start executing, because when I single step, it starts at 0x000 and I'm soon stuck at 0x0004 with a jmp 0x0004 loop. I can set the PC to 0x10000 and step through my program, but it seems to me that this isn't the way it should be done. Does anyone have a simple assembly language example project they would be willing to share, or instructions on what I'm missing to get my execution to start where it should?
This is pressing, as I have a class of Assembly Language students to explain how to get a CCS assembly project up and running tomorrow for the MSP-EKP430F5529LP.
Thanks for reading this and any possible help,
Rob
Hi Rob,
Sounds like this wiki page might help: http://processors.wiki.ti.com/index.php/Compiler/diagnostic_messages/10202
I see you have the .global RESET already, but maybe the project setting that it shows at the end is not set (go to Project > Properties > Build > MSP430 Linker > Advanced Options > Symbol Management and then "Specify program entry point for the output module" put RESET.
-Katie
Thanks Katie,
Unfortunately your suggestion is the same as adding --entry-point=RESET to the command line linker options, at least as far as I can tell. When I insert it in the GUI where you suggest, it shows up the same way I put it in the comand line options. The debugger still starts at 0x0000.
Any other ideas?
Thanks!
Rob
Hi Rob,
Thanks - I tried this out myself on another board and found the same issue. I think you may be running into the root issue from this other thread in the compiler forum that is still being worked on: http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/371025.aspx
If that's the case I think the problem is that the linker is placing the start of your code at 0x10000. Now, the reset vector is always stored at 0xFFFE-0xFFFF on MSP430, and this address contains the address to jump to for the start of your code - but the problem is that the start of code in this case was placed at 0x10000 and this address is too long to store in the 16 bits at 0xFFFE.
As a temporary workaround (since it looks like the linker root cause is still being investigated/worked on as mentioned in the thread I linked) you can modify your linker command file so that it will be forced to place your code in the lower FLASH only. Note: this is the quick and dirty workaround - it will work unless your code is bigger than 64kB, otherwise you'll need to do something a bit more advanced.
Now .text will all be placed in FLASH and nothing will be put in FLASH2. If you scroll up to the top of the file you'll see that FLASH is defined as the flash area from 0x4400-0xFFFF and FLASH2 contains all of the upper flash area starting at 0x10000.
Regards,
Katie
The trick is that the entry point needs to be handled and therefore has to be declared like an ISR. It isn’t really an ISR (it doesn’t return nor does it need to preserve any register values), but it needs to be put into lower 64k memory, like all ISRs.
I don’t know how ISRs are declared in CCS assembly, but it shouldn’t be a problem to figure out.
Well, as long as the whole project fits into the flash below 64k, Katie’s solution works as well.
**Attention** This is a public forum