Flowcode 4.3 Code not working on EB031

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
orbelsevoyan
Flowcode V4 User
Posts: 10
Joined: Sat Jan 07, 2012 7:26 pm
Has thanked: 1 time
Been thanked: 1 time
Contact:

Flowcode 4.3 Code not working on EB031

Post by orbelsevoyan »

Hello All,

I just bought EB031, and trying to program it, but facing problem, first i tried to use example provided in CD and demo is working (I have used compiled file from CD), but when I am compiling example using my own copy of Flowcode for ARM 4.3 example is not working anymore, I am not doing any changes in the code just coping to my PC and compiling. Also what I noticed that resulting file after my compilation is 15 kB, but file available from CD is 17 kB and this gives me idea that it is compiled by using other version of Flowcode.

Looking forward to hear from you.
Orbel

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Flowcode 4.3 Code not working on EB031

Post by DavidA »

Hello,

One thing we ask users of the forum if they need technical support for Flowcode v4 is to post in the Flowcode v4 forums, it is a simple and quick process and more information about how to do this is available from here:

http://www.matrixmultimedia.com/support ... f=29&t=602

As for your problem, could you please provide a few more details? Are you saying that if you send the precompiled ".hex" file down to the chip the example works exactly as expected, but if you load the ".fcf" file into Flowcode and click the "Send to Chip" button the example does not work as expected? Does it program OK or are there any errors or problems reported?

orbelsevoyan
Flowcode V4 User
Posts: 10
Joined: Sat Jan 07, 2012 7:26 pm
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Flowcode 4.3 Code not working on EB031

Post by orbelsevoyan »

Thank you very much for your help. Next time I will post in Flowcode 4, I am new in this forum :).

I am using SAM-BA 2.8 for programming, as example is using it. Yes you are correct when I am loading pre-compiled example it is working (file is *.bin), but when I am opening Flowcode file and compiling to hex, and loading bin file from SAM-BA it is not working. I am not using Flowcode for programming ARM micro-controller as there is no example or document which will guide through that process.

Orbel

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: Flowcode 4.3 Code not working on EB031

Post by Benj »

Hello,

Use SAM-BA to re-load the bootloader bin file from the "C:\Program Files\Matrix Multimedia\Flowcode ARM V4\Tools\Bootloader" directory and then specify the EB031 as your target in Flowcode and everything should work correctly.

orbelsevoyan
Flowcode V4 User
Posts: 10
Joined: Sat Jan 07, 2012 7:26 pm
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Flowcode 4.3 Code not working on EB031

Post by orbelsevoyan »

Hello Benj,

I tried to load bootloader using SAM-BA and device is correctly recognized in Windows (Windows 7, 32 bit), but when I am running Flowcode and trying to execute code
getting following error.


File name: C:\Users\OLYMP\Desktop\Temp\ARM Test File.c
Generated by: Flowcode v4.3.8.64
Date: Tuesday, January 10, 2012 00:53:39
Licence: Professional
Registered to: Orbel Sevoyan


http://www.matrixmultimedia.com


Launching the compiler...
C:\Program Files\Matrix Multimedia\Flowcode ARM V4\Tools\MX_bats\arm7comp.bat "ARM Test File" "C:\Users\OLYMP\Desktop\Temp"
In file included from ARM Test File.c:37:
C:/PROGRA~1/MATRIX~1/FLOWCO~1/Tools/MX_bats/../Global/OSstubs.c:192: warning: 'struct tms' declared inside parameter list
C:/PROGRA~1/MATRIX~1/FLOWCO~1/Tools/MX_bats/../Global/OSstubs.c:192: warning: its scope is only this definition or declaration, which is probably not what you want
ARM Test File.c: In function 'main':
ARM Test File.c:58: warning: return type of 'main' is not 'int'

Compilation successful!

Return code = 0

Launching the linker/assembler...
C:\Program Files\Matrix Multimedia\Flowcode ARM V4\Tools\MX_bats\arm7link.bat "ARM Test File" at91sam7s128

C:\Users\OLYMP\Desktop\Temp>arm-elf-gcc -mcpu=arm7tdmi -O2 -Wall "C:\PROGRA~1\MATRIX~1\FLOWCO~1\Tools\MX_bats\..\Global\Cstartup.o" "ARM Test File".o -lm -aln="ARM Test File".lst --output "ARM Test File".elf -nostartfiles -T"C:\PROGRA~1\MATRIX~1\FLOWCO~1\Tools\MX_bats\..\Global\at91sam7s128-ROM.ld" -L"C:\PROGRA~1\MATRIX~1\FLOWCO~1\Tools\MX_bats\..\arm-elf\lib" -L"C:\PROGRA~1\MATRIX~1\FLOWCO~1\Tools\MX_bats\..\lib\gcc\arm-elf\4.0.1"

C:\Users\OLYMP\Desktop\Temp>arm-elf-objcopy -O ihex "ARM Test File".elf "ARM Test File".hex

C:\Users\OLYMP\Desktop\Temp>arm-elf-objcopy -Osrec --srec-forceS3 "ARM Test File".elf "ARM Test File".s19

s19 file creation successful!

C:\Users\OLYMP\Desktop\Temp>hex2bin "ARM Test File".hex
hex2bin v1.0.1, Copyright (C) 1999 Jacques Pelletier
Lowest address = 00002000
Highest address = 0000589F

BIN file creation successful!

C:\Users\OLYMP\Desktop\Temp>arm-elf-readelf -s "ARM Test File".elf 1>"ARM Test File".fkt

ICD file creation successful!

Return code = 0

Launching the programmer...
C:\Program Files\Matrix Multimedia\Flowcode ARM V4\Tools\mLoader\mLoader.exe "ARM Test File.s19"
mLoader version:2.0.4.0
Please connect the ECIO/ARM and put it into program mode, or click 'Cancel' to close.

The file format is not compatible with the device firmware. Your device firmware will now be updated...


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

Reading chip type...atm6124.Sys ATMEL AT91xxxxx Test Board()


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

Sending Program... C:\PROGRA~1\MATRIX~1\FLOWCO~1\Tools\mLoader\\Bootloader.bin


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

Send Failed


....

The device firmware update was unsuccessful. Please contact technical support.


Return code = 39

Flowcode was unable to transfer the flowchart to the microcontroller. Check the programmer options and physical connections.

FINISHED

Looking forward to hear from you.

Orbel

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: Flowcode 4.3 Code not working on EB031

Post by Benj »

Hello,

Ok this shouldn't be happening. What if you load the bin file from the "Flowcode/Tools/mLoader" directory using SAM-BA?

orbelsevoyan
Flowcode V4 User
Posts: 10
Joined: Sat Jan 07, 2012 7:26 pm
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Flowcode 4.3 Code not working on EB031

Post by orbelsevoyan »

Hello,

I tried to change operating system to Windows XP but didn't solved problem, I tried all, but without success, please tel me what could be reason for this problem, as I do not see any other source of this problem. Also if you could have more detailed description of how to use this board with Flowcode that will be good.

Looking forward to hear from you.

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: Flowcode 4.3 Code not working on EB031

Post by Benj »

Hello,

When you have loaded the bootloader file using SAM-BA what are you doing with the TST jumper? Is it going back into the default position?

Also when you have loaded the bootloader, reset the board by holding the prog switch and tapping the reset switch. If you have Windows device manager open when you do this then you should get a HID device appearing briefly while the hardware connects to the PC. During this period if you also have the mLoader software running (C:\Program Files\Matrix Multimedia\Flowcode ARM V4\Tools\mLoader) then this will detect the EB031 is connected and keep it in bootloader mode.

orbelsevoyan
Flowcode V4 User
Posts: 10
Joined: Sat Jan 07, 2012 7:26 pm
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Flowcode 4.3 Code not working on EB031

Post by orbelsevoyan »

Hello Benj,

Yes when I am loading using SAM-BA, I am putting TST jumper back to Default state.

Let me to tell you actions that I am taking when want to program

1. Putting power switch on OFF state
2. Changing TST jumper to TST state
3. Putting power switch on ON state
4. Waiting for 10 sec
5. Putting power switch on OFF state
6. Changing TST jumpper to Default state
7. Putting power switch on ON state
8. From SAM-BA Loading boot-loader from following path "C:\Program Files\Matrix Multimedia\Flowcode ARM V4\Tools\mLoader"
9. Setting address in samba as 0x11E000
10. Pushing send button and two times pushing yes to Unlock and Than to Lock regions (7 to 7)
11. After this Closing SAM-BA and opening mLoader
12. Pushing prog button and than RESET button on development board while holding PROG button (just for 1 or 2 seconds)
13. On the bottom mLoader shows following "Connected to: atm6124.Sys ATMEL AT91xxxxx Test Board" and at the end of line there is such text "Bootloader:" no text after Bootloader seems that there should be firmware version.
14. Choosing File that I want to load
15. Pushing Send button and program hangs at this point with message showing "Updating Firmware". I have waited for 2 mins and got following response "Bad responce from device, can not send file!"

Please guide me if I am doing something wrong.

Orbel

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: Flowcode 4.3 Code not working on EB031

Post by Benj »

Hello Orbel,

Right I think I have spotted the problem. Thanks for helping to clarify.
9. Setting address in samba as 0x11E000
You should send the v4 mLoader bootloader to location 0x100000 i.e. the default location.

Then hopefully the Flowcode download will work correctly from then on without having to repeat the SAM-BA operation.

Let me know how you get on.

orbelsevoyan
Flowcode V4 User
Posts: 10
Joined: Sat Jan 07, 2012 7:26 pm
Has thanked: 1 time
Been thanked: 1 time
Contact:

Re: Flowcode 4.3 Code not working on EB031

Post by orbelsevoyan »

Thank Benj,

Yes it fixed problem, but there was one more thing. When you pushing "Compile to Chip" button in Flowcode it is asking to put in programming mode, then I am pushing Prog button and then RESET button while holding Prog button. But I realized that after releasing RESET button you should keep PROG button pushed till it finishes and then it works.
Thank you for helping me out.

Orbel

Post Reply