hex file by AVR Flowcode 4 doesn't run correct on HW

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Huib Koppers
Posts: 63
Joined: Fri Oct 12, 2007 5:13 pm
Location: Netherlands
Been thanked: 1 time

hex file by AVR Flowcode 4 doesn't run correct on HW

Post by Huib Koppers »

Hello,

Solving the last issues by spi and return code = 1, brings me to another topic due to generated hex file after compilation by AVR FlowCode v4

The strange thing is that after compiling the C Source generated by AVR FlowCode V4 the program doesn't run correctly on HW

I discovered this by comparing the generated hex file (18k) generated by AVR Studio 4.18 SP2 and the hex file (11k) generated by AVR FlowCode v4.

Both compiler programs are using the same C source which is generated by AVR FlowCode v4

The result is that the hex file from AVR Studio runs on HW without problems and the generated hex file by AVR FlowCode v4 doesn't run correctly.

Both hex files are programmed with the same AVR programmer which uses the STK500 protocol with chip settings; AVR-Clock 16 MHz, AVR-fusesettings 0xdf, 0xff, 0xff

I have used the same program i send earlier to Ben and have made all your SPI recommendations and solved the SPI hang problem which i mentioned in the SPI topic but the program just runs correctly when the hex file is generated by AVR Studio and not by AVR FlowCode.

So the question is what is it this time ?

I have send you the updated flowCode source by PM

Kind Regards

Huib

Huib Koppers
Posts: 63
Joined: Fri Oct 12, 2007 5:13 pm
Location: Netherlands
Been thanked: 1 time

Re: hex file by AVR Flowcode 4 doesn't run correct on HW

Post by Huib Koppers »

Hello,

Why is there no answere on this topic by Matrix Multimedia ?

I have found this problem during programming so i think it is importend

I can understand that you are dealing with a lot of problems to solve and don't have time to deal with this topic.

If so please let me know

Kind Regards

Huib

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: hex file by AVR Flowcode 4 doesn't run correct on HW

Post by Benj »

Hello Huib,

Sorry for the delay.

That is very odd indeed. Essentially both Flowcode and AVR studio should be using essentially the same compiler toolchain via the AVR GCC compiler resource.

Looking at the hex files using ExamDiff there is definatley two sections of code that are different.

Are you using the C code directly in AVR studio or are you editing it at all?

Does the Flowcode compiled hex file run at all or can you find anything that causes the lockup to occur or become more promonant?

Huib Koppers
Posts: 63
Joined: Fri Oct 12, 2007 5:13 pm
Location: Netherlands
Been thanked: 1 time

Re: hex file by AVR Flowcode 4 doesn't run correct on HW

Post by Huib Koppers »

Hello Ben,

I only use the same C source from my DDS program (generated by AVR FlowCode) for both compilers AVR Flowcode and AVR Studio, without editing it first in AVR Studio.

And you are right that both compilers use the same GCC Compiler except that the AVR Studio GCC compiler has a newer version but this should not be the issue.

Therefore its very strange why the hex file generated by AVR studio works fine and the generated hex code by AVR Flowcode doesn't and I think that it runs only the init part of the program (init frequency is displayed on LCD)and then it hangs.
But this happens for now on my DDS example program which I had send you earlier by PM.

I have not yet the flowkit debug tool from Matrix otherwise there was a chance I could tell you which part in the program causes the problem. On this moment I have only the AVR Dragon board which also support AVR debugging.

I'm not so familiar with debugging tools but maybe there is an solution by debugging it by AVR Dragon.
But I don't know if this can be working with FlowCode and if it can, then it should be deal with both compiled hex files in debugging mode with AVR FlowCode.

If AVR Dragon can work in debugging mode with FlowCode then i hope to find soon the real causing problem and can let you know about it otherwise I have to buy first the FlowKit as debugging tool

Kind Regards

Huib

Post Reply