By trivial I mean “loop: b loop”. I’ve looked in the examples and the help and I can’t find any guidance. I created an asm file and hit F7 and the program (Crossworks, that is) goes into the weeds forever. Same behavior on v1.7 and v2.0. If I insert errors in the asm file it catches those and recovers instantly and normally, so it’s programs without errors that cause it to expire.
So can anybody help me with this should-be-drop-dead-simple matter? I’m just doing this as an exercise in bringing up an ARM board (LPC2294) all on my own, to understand the process. I’ve written asm on plenty of processors (don’t worry, I’m not an asm fanatic), but I’ve never been stumped like this before.
If need be I’m OK with using a different (free, easy to install) assembler for this exercise.
kk6gm:
By trivial I mean “loop: b loop”. I’ve looked in the examples and the help and I can’t find any guidance. I created an asm file and hit F7 and the program (Crossworks, that is) goes into the weeds forever.
Maybe you need to add a couple of lines of code to this. I would expect "loop: b loop" to go into the weeds forever. It is a *single* instruction that results in an infinite loop so it might be tricky to even breakpoint it.
All ARM7TDMI architecture devices (e.g. the LPC2294) need a minimal amount of assembler code to setup stack pointers, interrupt vectors, program status registers etc. before your actual code is executed. I haven’t used Crossworks so don’t know the details but there would be some make / builder / linker type of options that control this.
In any case, you will get a better understanding of what is going on if you read the NXP Application note AN10404 “Initialization Code/Hints for the LPC2000 Family” which you can download from:
kk6gm:
By trivial I mean “loop: b loop”. I’ve looked in the examples and the help and I can’t find any guidance. I created an asm file and hit F7 and the program (Crossworks, that is) goes into the weeds forever.
Maybe you need to add a couple of lines of code to this. I would expect "loop: b loop" to go into the weeds forever. It is a *single* instruction that results in an infinite loop so it might be tricky to even breakpoint it.
Sorry for the confusion. I mean that Crossworks itself is going into the weeds. It "builds" my program forever. I wouldn't think a few lines of asm code and directives could do that to an assembler, even if they had syntax errors.
In any case, you will get a better understanding of what is going on if you read the NXP Application note AN10404 “Initialization Code/Hints for the LPC2000 Family” which you can download from:
leon_heller:
I don’t get that, you must have created the project wrongly.
How does one create an assembly language project correctly? Which files are necessary? I know not all the files for a C/C++ project are necessary. I'm trying to do a bare bones one-file project, so should any other files be necessary? Can't I specify everything in one source file along with some linker configuration entries?
The good news is, I have a happy blinking LED now via assembly code. I had to include the LPC2294.h include file using #include rather than .include. Didn’t know that was possible, just took a guess, now I’ll look for it in the manual.
On the subject of file extensions, what is the difference between a .asm and a .s file? I haven’t found anything that discusses this.
I really realize that this is very important issue to create trivial ASM progaram
Glad to find we're in agreement.
BTW, regarding my quest, I got everything figured out, and have recently been working with interrupts in ASM (via the VIC, LPC2294). I’m pretty much at the point where I think I’m familiar enough with ARM ASM to call it a day. Not an expert by any means, but I think I’ve got a decent understanding of what’s going on under the hood, which was the whole purpose of the exercise.