ASM / C Block not compiling

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
henker
Posts: 45
Joined: Mon Dec 22, 2008 11:22 pm
Location: Prospect, NS, Canada
Has thanked: 7 times
Been thanked: 2 times

ASM / C Block not compiling

Post by henker »

Hello,

I need to use an ASM block in my program in order to jum to a specific address when an interrupt is receiver.
The code that I entered is this:

asm goto 0x17F52

I have also tried

asm
{
goto 0x17F52
}

these option do not seem to be working as the compiler shows an error.

Thanks for the help
Henk

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: ASM / C Block not compiling

Post by JonnyW »

Hi. If this is still an issue, could you post the error message and maybe the Flowcode project file and generated C file if possible please?

The code you show compiles file with my version (this is v5). Both versions compile without problems.

Cheers,

Jonny

User avatar
Steve
Matrix Staff
Posts: 3429
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: ASM / C Block not compiling

Post by Steve »

Hi Henk,

Which version of Flowcode are you using? There were some significant changes between V2 and V3 that could account for your issue.

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: ASM / C Block not compiling

Post by medelec35 »

I can confirm

Code: Select all

asm
{
goto 0x17F52
}
does not compile with V3.6.11.53
But does Compile with V4 and higher.

With V3.6.11.53 you get:

Code: Select all

File name:     C:\Flowcode_Testing\asm.c

Generated by:  Flowcode v3.6.11.53

Date:          Friday, February 10, 2012 09:48:43

Licence:       Professional

Registered to: Martin

http://www.matrixmultimedia.com


Launching the compiler...

C:\Program Files (x86)\Matrix Multimedia\Flowcode V3\BoostC\boostc.pic18.flowcode.exe -v -t PIC18F4685 "asm.c"

BoostC Optimizing C Compiler Version 6.70 (for PIC18 architecture)

http://www.sourceboost.com

Copyright(C) 2004-2007 Pavel Baranov

Copyright(C) 2004-2007 David Hobday

Licensed to FlowCode User under Single user Pro License for 1 node(s)

Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited

asm.c

Starting preprocessor: "C:\Program Files (x86)\Matrix Multimedia\Flowcode V3\BoostC\pp.exe" C:\Flowcode_Testing\asm.c -i "C:\Program Files (x86)\Matrix Multimedia\Flowcode V3\BoostC\include" -d _PIC18F4685 -la -c2 -o asm.pp -v -d _BOOSTC -d _PIC18 

......................

C:\Flowcode_Testing\asm.c(83): error: error in built-in assembly

asm.c success

failure

Return code = 1

Flowcode was unable to compile the flowchart's C code due to the following errors:

If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.

FINISHED
Martin
Attachments
asm.fcf
(2.5 KiB) Downloaded 309 times
asm.c
(1.48 KiB) Downloaded 332 times
Martin

Post Reply