Fuses for non-standard programmer

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

Moderators: Benj, Mods

Post Reply
bert
Posts: 23
Joined: Wed Feb 28, 2007 11:58 pm
Location: The Netherlands
Contact:

Fuses for non-standard programmer

Post by bert »

I use an Xwisp programmer which assumes the fuses to be in the hex file.

In my program I've added a C box at the very beginning of the program with the following content:

/* fuses
asm __config 0x3f32
*/


While downloading the programmer complains and says it cannot find fuses in the hex file. I don't read hex but I checked the asm file, and I can't find the config line in the asm file. It is still present in the c file.

So, what am I doing wrong in order to get the fuses (config) in the hexfile?

Any help would be appreciated. I use the V3 (3.1.0.31) 30 day evaluation versiopn.

Bert

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

Post by Steve »

try this:

#pragma DATA 0x2007, 0x3f32

You may have to put this in the "defines" box of the "supplementary code" window, rather than in a 'C' icon.

bert
Posts: 23
Joined: Wed Feb 28, 2007 11:58 pm
Location: The Netherlands
Contact:

Post by bert »

Thanks Steve, that did fix it.

Nevertheless I still would expect any asm statement added in a C box to be carried on to the asm file. Why didn't that work?

Bert

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

Post by Steve »

The "__config" line is not a generic asm statement - it is a preprocessor directive specific to MPASM. Perhaps this is the reason it is not transferred.

Version 3 of Flowcode uses a C compiler that generates a HEX file directly from the C code (via a linker). The "asm" file that is generated is like a by-product of this process, rather that a step between the C code and the HEX file (which was the case in the compiler used by v2 of Flowcode).

Post Reply