Searching \ for '[PIC] HiTECH ASPIC example' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: piclist.org/techref/microchip/ios.htm?key=spi
Search entire site for: 'HiTECH ASPIC example'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] HiTECH ASPIC example'
2012\03\27@152359 by Wouter van Ooijen

face picon face
I want to combine C and assembler files using HiTech C (and the ASPIC assembler included in the compiler distribution), using MPLABX. All I get so far when a trivial assembler file

                PSECT text0
               MOVLW 1

is 'compiled' is a message that picc has crashed.

Has anyone experience with this? maybe an example file?

--
Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu
C++ on uC blog: http://www.voti.nl/erblog

2012\03\27@160253 by Isaac Marino Bavaresco

flavicon
face
Em 27/3/2012 16:23, Wouter van Ooijen escreveu:
> I want to combine C and assembler files using HiTech C (and the ASPIC
> assembler included in the compiler distribution), using MPLABX. All I
> get so far when a trivial assembler file
>
>                  PSECT text0
>                MOVLW 1
>
> is 'compiled' is a message that picc has crashed.
>
> Has anyone experience with this? maybe an example file?


Create a C file with the "skeleton" of the routines that you want to
write in ASM and compile it to assembly only.
Use the generated assembly file as a base for your own code.


Isaac

2012\03\27@165333 by Wouter van Ooijen

face picon face
> Create a C file with the "skeleton" of the routines that you want to
> write in ASM and compile it to assembly only.

Good idea, but I use MPLABX to do the compilation - how do I coerce MPLABX into doing this?

--
Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu
C++ on uC blog: http://www.voti.nl/erblog

2012\03\27@172715 by Isaac Marino Bavaresco

flavicon
face
Em 27/3/2012 17:53, Wouter van Ooijen escreveu:
>> Create a C file with the "skeleton" of the routines that you want to
>> write in ASM and compile it to assembly only.
> Good idea, but I use MPLABX to do the compilation - how do I coerce
> MPLABX into doing this?


MPLABX probably allows you to specify additional command line arguments
for the compiler (MPLAB IDE does). Just read the compiler's manual to
learn what parameter does the trick.

Isaac


'[PIC] HiTECH ASPIC example'
2012\04\09@073732 by Gerhard Fiedler
picon face
Wouter van Ooijen wrote:

>> Create a C file with the "skeleton" of the routines that you want to
>> write in ASM and compile it to assembly only.
>
> Good idea, but I use MPLABX to do the compilation - how do I coerce
> MPLABX into doing this?

A little late... Another way is to stay in C, that is, the file remains
a C file with global/static variables and functions, and you fill the
function bodies with assembly. Not quite the same, but for some cases
adequate. An advantage is that the compiler knows about the function
signatures and can manage them like all other C functions (and you don't
have to worry about any of the details of segment management etc.). A
disadvantage is that the compiler may add some code to the function
body.

Gerhar

2012\04\10@023015 by Wouter van Ooijen

face picon face
> A little late... Another way is to stay in C

For didactic reasons I don't want to do that.

The problem was in my PSECT line, IIRC I first used

    PSECT text0

Which simply crashed the compiler and/or assembler. Now I use

    PSECT text0,local,class=CODE,delta=2


--
Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu
C++ on uC blog: http://www.voti.nl/erblog

More... (looser matching)
- Last day of these posts
- In 2012 , 2013 only
- Today
- New search...