View ASM...

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

Moderator: Benj

Post Reply
Bernie_P
Posts: 5
Joined: Thu Apr 18, 2019 9:08 am
Been thanked: 2 times
Contact:

View ASM...

Post by Bernie_P »

We currently use Flowcode 5, but have a project that requires two Microchip microcontrollers communicating via SPI, where one is the Master and the other is the Slave.

Flowcode 5 has a module for legacy SPI Master but no module for Slave, therefore we are trialing Flowcode 8, which has both Master and Slave SPI modules, with a view to upgrading if it can provide us with a solution.

My question is, does Flowcode 8 generate the PIC assembly code file, like Version 5 did, because although a HEX file is fine for programing the PIC, we use the Flowcode generated ASM file in Microchip's MPLAB IDE, in conjunction with their PICKit3 programer/debugger, to debug the code.

Is 'View ASM...' and the generation of an assembly code file missing because this is the trial version, or have you removed this functionality from Version 8.

Thanks

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: View ASM...

Post by Benj »

Hello,

Flowcode 8 generates a .as file as part of the XC8 C compilation which you should be able to use in MPLAB. We dropped the view as assembler function from the menu as it was seldom used and not always available with every target chip type.

Bernie_P
Posts: 5
Joined: Thu Apr 18, 2019 9:08 am
Been thanked: 2 times
Contact:

Re: View ASM...

Post by Bernie_P »

Hi Ben,

Thank you for your reply, I've found the .as file you mentioned and tried it MPLAB X, but unfortunately it causes a build fail when the file is assembled, as follows,

{
"make: *** No rule to make target 'build/default/production/_ext/1472/Flowcode1.o'. Stop.

BUILD FAILED (exit value 2, total time: 203ms)"
}

the name of the .as file is 'Flowcode1.as' hence the 'Flowcode1.o' in the message above.

This is probably an MPLAB generated issue and therefore outside the scope of this forum, but have you or anyone else tried to use one of these .as files in MPLAB and succeeded in assembling them without a build fail, and if so, how?

As a side note, the .asm files generated in Flowcode 5 assemble faultlessly.

Thanks

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: View ASM...

Post by Benj »

Hello,

The .as file is automatically generated by the XC8 compiler and so there should be a nice documented way of allowing this to be imported into MPLAB correctly. After all they are both tools from Microchip.

Bernie_P
Posts: 5
Joined: Thu Apr 18, 2019 9:08 am
Been thanked: 2 times
Contact:

Re: View ASM...

Post by Bernie_P »

Hi,

As a follow up, I have now managed to assembly a Flowcode .as file in MPLAB X IDE v5.15. It appears that Flowcode uses an older version of the XC8 compiler (XC8.exe) whereas MPLAB uses the current version v2.05 (XC8-cc.exe) and there have been some changes to the new version http://microchipdeveloper.com/xc8:whats-new-in-xc8-2-0.

I found the way to get the .as file to compile in MPLAB was to change one line at the beginning of the Flowcode generated .as file, from "opt lm" to "opt flic" and set the compiler in MBLAB to use C90 C code standard instead of the default of C99 C code standard.
To do this, in MPLAB X, select 'Project Properties' under 'File' menu, then in the 'XC8 Global Options' category change C standard from C99 to C90 and apply the change, also in the 'XC8 Linker' category change the 'Link in C Library' from C99 to C90 and apply the change (double check that both changes have taken, on one occasion, I found that the settings I had applied had reverted back to C99).

Code: Select all

opt subtitle "Microchip Technology Omniscient Code Generator v1.45 (Free mode) build 201711160504"

opt pagewidth 120

	opt lm

	processor	16F1933
opt include "C:\PROGRA~2\Flowcode\COMPIL~1\pic\include\16f1933.cgen.inc"

Code: Select all

opt subtitle "Microchip Technology Omniscient Code Generator v1.45 (Free mode) build 201711160504"

opt pagewidth 120

	opt flic

	processor	16F1933
opt include "C:\PROGRA~2\Flowcode\COMPIL~1\pic\include\16f1933.cgen.inc"

Post Reply