Getting started issue with Olimex E407 and IAR

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderators: RoccoMarco, barthess

Cols
Posts: 4
Joined: Tue Nov 11, 2014 11:05 am

Getting started issue with Olimex E407 and IAR

Postby Cols » Tue Nov 11, 2014 3:18 pm

Hi everbody,

I am trying to get started with ChibiOS but I am stuck.

I got:
* ChibiOS 2.6.6
* Olimex E407 board "Rev E"
* Demo project "ARMCM4-STM32407-LWIP-FATFS-USB
* IAR Workbench for ARM 7.2

I created a new project and importet all the files. I checked the IAR demo project for the STM Discovery board to make sure compiler settings are all done (I very likely missed something here).

The project runs to / or jumps to some random function (otg_epin_handler) and gets stuck there.

When downloading (using I-jet) the project I get the warning "download error at 0x08000000: downloading into non-writable memory" and later "Stopped by a vector catch" - which is propably relevant ?!. I think I am missing some setting here - propably the starting vectors are messed up or similar.

Any ideas ?

Regards, Cols

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Getting started issue with Olimex E407 and IAR

Postby Giovanni » Tue Nov 11, 2014 4:03 pm

Hi,

Before attempting the above, you should try an existing IAR demo and verify everything works correctly.

I suggest you take the "iar" directory from another F4 demo and then you add the missing files to the project, there are a lot of settings that could go wrong. Note that the startup file, vectors and scatter file are provided with ChibiOS.

Another note, that demo targets the STM32-E407 version B/C which uses another PHY, you have to switch to the correct board files.

Giovanni

Cols
Posts: 4
Joined: Tue Nov 11, 2014 11:05 am

Re: Getting started issue with Olimex E407 and IAR

Postby Cols » Tue Nov 11, 2014 6:05 pm

Unfortunately, there is no "ready-to-go" project for the IAR Workbench and the Olimex E407 board.

The closest one is the IAR project for the STM Discovery board - but there I have to change the board files. This fails, too (Error message while compiling: "STM32_PLLVCO outside acceptable range ..")

Is there a 'ready-to-go' project for the IAR Workbench and the Olimex E407 board ?

Thanks, Cols

(P.S. how to adjust the PHY stuff is nicely described in an other thread - thanks for pointing out)

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Getting started issue with Olimex E407 and IAR

Postby Giovanni » Tue Nov 11, 2014 6:45 pm

I don't have IAR/keil projects for each demo because maintaining those project files is a PITA, the formats continuously evolve and when there is a change in paths then you have to update all of them manually, this is why you only find few samples.

About the clock problem, it is because the different xtal on boards, make sure to set STM32_PLLM_VALUE to 12 in your mcuconf.h. Other differences can be in main.c because different pin names in board.h, easy to adjust.

Giovanni

Cols
Posts: 4
Joined: Tue Nov 11, 2014 11:05 am

Re: Getting started issue with Olimex E407 and IAR

Postby Cols » Wed Nov 12, 2014 3:45 pm

'Finally got it to work.

Hint for other users:

In the configuration as posted in the first post, I missed out:
* IAR project options / Debugger (L-jet): Use macro files (check) and then "$PROJ_DIR$\STM32F2xxtracemac.mac" - this file can be copied from the original Olimex project
* IAR project options / Debugger / Download: "Verify download" (checked) and "use flash loader" (checked)

Good luck,
Cols


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 13 guests