Author |
Message |
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Wed Jul 03, 2013 12:19 pm Post subject:
ASM30 Question |
|
|
I use ASM30 to assemble code for a dsPIC33F.
I like to keep peripheral device initialization code in separate files for each device, such as UART1.init for initializing UART1.
I use the .include directive to include the files into the main .s file.
There are no directives in the .init files.
This works and assembles into a working executable.
The only problem I have is that the disassembly listing comes out weird. Weird in that while all of the instructions are included with their proper program memory addresses, the order of the lines is not sequential according to address and the source code is not listed with the machine language output. In fact, it's scrambled to the point of looking rather random. This makes troubleshooting using the disassembly listing rather useless when I'm looking at the initialization code. If I replace the .include directives with the code from those .init files, the disassembly listing looks perfectly normal. Using the .include method, The actual address lines contain the correct instruction data, but they are not in sequential order.
I am using MPLAB version 8.87.00.00
Has anyone else seen this?
If so - is there a solution? _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
bubzy
Joined: Oct 27, 2010 Posts: 594 Location: United Kingdom
Audio files: 64
|
Posted: Thu Sep 19, 2013 11:52 am Post subject:
|
|
|
arduino _________________ _Richard_ |
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Thu Sep 19, 2013 1:01 pm Post subject:
|
|
|
Well, I need 40 MIPS, 16 bit processing and DSP instructions. Arduino got that? _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
bubzy
Joined: Oct 27, 2010 Posts: 594 Location: United Kingdom
Audio files: 64
|
Posted: Thu Sep 19, 2013 2:00 pm Post subject:
|
|
|
pff arduino has that for breakfast !!! _________________ _Richard_ |
|
Back to top
|
|
|
yerpa58
Joined: Mar 08, 2008 Posts: 57 Location: Wisconsin
Audio files: 4
|
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24075 Location: The Netherlands, Enschede
Audio files: 277
G2 patch files: 320
|
Posted: Fri Sep 20, 2013 1:48 pm Post subject:
|
|
|
stuff like this, and also macro code getting messed up while debugging in MPLAB made me add a postprocessor to my forth compiler ... so everything is inlined properly - it was not that hard to write ... _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Fri Sep 20, 2013 2:12 pm Post subject:
|
|
|
I believe that this is some compiler bug, haven't researched it very extensively on the Microchip forums yet.
What I did find was that I could copy the randomized stuff and paste it into a document and use a sort program (really just linux sort) to put all of the lines in numerical order. Since the address of each instruction line is first, this works nicely. Just seems to me that I should NOT have to do such things, but at least there are tools that can be pressed into use. So far, this method has been effective enough.
Fortunately, I don't need this very much, but when troubleshooting weird problems with initialization, this really helps. _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
JovianPyx
Joined: Nov 20, 2007 Posts: 1988 Location: West Red Spot, Jupiter
Audio files: 224
|
Posted: Fri Sep 20, 2013 2:19 pm Post subject:
|
|
|
Thank you yerpa58. I am now wondering if the problem I am having is that I use the extension .init instead of .s.
I shall at some point test changing the files to *.init.s to see if the problem abates.
One thing that parallels the Microchip thread cited is that the actual source code text from the .init files does not appear (as does the .s source code) in the disassembly listing.
Speaking of waveguides, I have 2 dsPIC synths that use Karplus-Strong methods (also known as digital waveguides). One is an 8 voice polysynth (using 3 dsPICS, one for MIDI controller, 2 for voice engines) and a single dsPIC 4 string Karplus-Strong bass synth (MIDI controller and voice engine share one dsPIC).
EDIT ADD:
I found this in the thread....
Quote: | The .include'd code DOES show up in the Disassembly window, though not in a natural address order (this is a known "bugture" of MPLAB). To see everything in a natural order, open a Program Memory window and select a symbolic view. See the attached files with exported Disassembly and ProgMem window contents. |
So at least I know it's a bug that is already reported (and apparently they ignore it)... _________________ FPGA, dsPIC and Fatman Synth Stuff
Time flies like a banana. Fruit flies when you're having fun. BTW, Do these genes make my ass look fat? corruptio optimi pessima
|
|
Back to top
|
|
|
|