[Icc-430] Assembly labels, line numbers and NoIce

llchisho at paradise.net.nz llchisho at paradise.net.nz
Wed Mar 19 17:26:56 PST 2008


I am using ICC430V7.06A and NoICE 8.8.6.1600 for the MSP430F1611.

I have some assembly language source files in my project, and I have put double
colons after the public labels and started them with an _. These routines are
called from C with prototypes in an h file.
The project links and runs correctly, but the names of the labels from the
assembly source files are not present in NoICE. They do not appear in the DBG
file either.

I attempted to add .dbfunc and .dbend directives similar to the ones emitted by
the C compiler in the assembly code it writes but this caused a linker crash.
Adding the phony -1 and -2 line numbers fixed that but still doesn't give
source-level debug.

How can I make the public labels visible in NoICE ?
How can I do source-level debug of assembly source ?

Since first writing this I have tried V7.07beta with NoIce 9, and have got the
same result.

Ticking the undocumented box under Project/Options/Compiler "Generate Assembly
Line Numbers for NoIce430" results in a string of messages saying that .s files
cannot be found in the project directory.
I generate my output files in an O directory under the project directory, and
the .s files which cannot be found are C compiler output files and are in the O
directory.
However, something is done as all the .o files get line numbers relating to the
.s files added which totally mucks up the source display in NoIce.
I'm not sure quite what this is supposed to be used for and with what limitations.

Perhaps we need an assembly pre-processor which takes a .asm (say) file and
generates a .s file with line number definitions and function information added.
Then the IDE needs to know how to use it.

PS For some cases there may be an advantage in having a "#pragma raw
<functionname>" (or something), which would be similar in usage to "monitor" or
"interrupt" but the opposite in effect in that the compiler wouldn't generate
any function entry or exit code at all, and wouldn't validate parameter use and
return value assignment, but would still emit the necessary directives for block
start/end, line numbers etc.
This would leave all code to be inserted by the programmer using inline assembly
statements, or C for the brave, but register preservation would not be the
compiler's job so minimal assembly functions can be tidily added to C source.
This would remove the source of the empty declaration messages.

Thanks, Len Chisholm.



More information about the Icc-430 mailing list