ARM V4 Programs not running on AT91SAM7S-EK

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
Contact:

ARM V4 Programs not running on AT91SAM7S-EK

Post by Huib Koppers »

Hello,
Last edited by Huib Koppers on Thu Aug 26, 2010 3:55 pm, edited 5 times in total.

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: ARM V4 Programs not running on AT91SAM7S-EK

Post by Benj »

Hello,

Which address are you loading the bootloader into using SAM-BA?

You should be using the default location of 0x1000000 for use with the new v4 ARM bootloader software.

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

Re: ARM V4 Programs not running on AT91SAM7S-EK

Post by Huib Koppers »

Hello
Last edited by Huib Koppers on Thu Aug 26, 2010 3:56 pm, edited 1 time in total.

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

Re: ARM V4 Programs not running on AT91SAM7S-EK

Post by Huib Koppers »

Hello,
Last edited by Huib Koppers on Thu Aug 26, 2010 4:02 pm, edited 1 time in total.

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: ARM V4 Programs not running on AT91SAM7S-EK

Post by DavidA »

Hello huib,

Do you have access to a 32bit computer? The issue is that there are no atmel drivers for 64 bit machines and the AT91SAM7S-EK. To be able to use the AT91SAM7S-EK device on your 64bit machine you will need to follow the instructions in the bootloader documentation, but this can only be done on a 32 bit machine since there are no 64bit drivers for the "default" ATMEL bootloader (default bootloader is the one loaded in by having the jumper in the TST position).

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

Re: ARM V4 Programs not running on AT91SAM7S-EK

Post by Huib Koppers »

Hello,
Last edited by Huib Koppers on Thu Aug 26, 2010 3:57 pm, edited 3 times in total.

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

Re: ARM V4 Programs not running on AT91SAM7S-EK

Post by Huib Koppers »

Hello,
Last edited by Huib Koppers on Thu Aug 26, 2010 3:58 pm, edited 1 time in total.

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: ARM V4 Programs not running on AT91SAM7S-EK

Post by DavidA »

Flowcode v4 files only work on the new Matrix HID bootloader, not the ATMEL TST bootloader or the old Matrix bootloader. The files which you should be using to upload to the new bootloader are the s19 files.

- you need to put the new HID bootloader at memory 0x100000 using SAM-BA

- you need to make a new test program (a 1s flasher or something) and get the s19 file and use mLoader to load the s19 file into the chip

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

Re: ARM V4 Programs not running on AT91SAM7S-EK

Post by Huib Koppers »

Hello,
Last edited by Huib Koppers on Thu Aug 26, 2010 4:03 pm, edited 1 time in total.

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: ARM V4 Programs not running on AT91SAM7S-EK

Post by DavidA »

Hello Huib,

Which chip is it you are trying to program?

AT91SAM7S__ <--- whats the number.

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

Re: ARM V4 Programs not running on AT91SAM7S-EK

Post by Huib Koppers »

Hello,
Last edited by Huib Koppers on Thu Aug 26, 2010 4:03 pm, edited 1 time in total.

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: ARM V4 Programs not running on AT91SAM7S-EK

Post by DavidA »

Hello Huib,

I have just tested on a AT91SAM7S256, a simple 1s flasher and it worked.

Could you please:

- load the new bootloader into 0x100000 again

- then go into mLoader directly (located at Program Files\Matrix Multimedia\Flowcode ARM v4\tools\mLoader)

- could you then press the reset key on your device, this should let mloader detect the device,

I should then come up at the bottom "Matrix HID Device" and Bootloader "..." or something along those lines.

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

Re: ARM V4 Programs not running on AT91SAM7S-EK

Post by Huib Koppers »

Hello,
Last edited by Huib Koppers on Thu Aug 26, 2010 5:30 pm, edited 1 time in total.

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

Re: ARM V4 Programs not running on AT91SAM7S-EK

Post by Huib Koppers »

Hello,
Last edited by Huib Koppers on Thu Aug 26, 2010 4:01 pm, edited 1 time in total.

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

Re: ARM V4 Programs not running on AT91SAM7S-EK

Post by Huib Koppers »

Hello,
Last edited by Huib Koppers on Thu Aug 26, 2010 4:01 pm, edited 1 time in total.

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: ARM V4 Programs not running on AT91SAM7S-EK

Post by DavidA »

Hello Huib,

thanks, I will look into this a little later today.

edit: Have you tried a simple 1s flasher Huib? To see if the writing to device is returning to correctly, so we can eliminate that.

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: ARM V4 Programs not running on AT91SAM7S-EK

Post by DavidA »

Hello Huib,

I have looked at your program and it does not match the board hardware at all, the LEDs are high and light on zero not FF, the switches are on the wrong ports, please try a 1s flasher.

porta->255, 1s delay, porta->0, 1s delay, (while (1))

that should program fine.

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

Re: ARM V4 Programs not running on AT91SAM7S-EK

Post by Huib Koppers »

Hello,
Last edited by Huib Koppers on Thu Aug 26, 2010 3:59 pm, edited 1 time in total.

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: ARM V4 Programs not running on AT91SAM7S-EK

Post by Benj »

Hello Huib,

Flowcode v3 of ARM used to put all the device startup information into the output bin file and to do this it linked the "Cstartup_SAM7_64_EK.c" file.

Flowcode v4 of ARM now uses a bootloader that lives at the start of memory so no initialisation is required by the Flowcode output s19 file. This makes the bootloader much more reliable as the jump to the bootloader is no longer needed and cannot be overwritten by incorrect bin files etc. This means that the file "Cstartup_SAM7_FCV4.c" is used for each and every device.

Maybe you will need to check that the Board_Generic.h file that is in the "Flowcode v4\Tools\Global" folder is correct for your expected pin out. However this looks identical to the v3 version of the file.

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

Re: ARM V4 Programs not running on AT91SAM7S-EK

Post by Huib Koppers »

Hello,
Last edited by Huib Koppers on Thu Aug 26, 2010 4:00 pm, edited 1 time in total.

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

Re: ARM V4 Programs not running on AT91SAM7S-EK

Post by Huib Koppers »

Hello,

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

Re: ARM V4 Programs not running on AT91SAM7S-EK

Post by Huib Koppers »

Hello,

Problems have been solved by changing hardware configuration.

PortC which was driving the LCD, was interfering with serial communication and has now changed to PortA (0,1,2,3,4,5)

PortD which was reading the switches was interfering with ADC has now changed to PortB (0,1)

Probably the initialising for ADC and Serial communication was in FCv3 on a different way managed then in FCv4.

My mistake was to expect the same configuration in managing ports from the older version by FCv3 to the new version of FCv4.

Everything works again.

Post Reply