[DONE] Starting ChibiOS on STM32F107 with Keil

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

Moderator: RoccoMarco

Maxxie
Posts: 21
Joined: Mon Mar 18, 2013 2:56 pm

[DONE] Starting ChibiOS on STM32F107 with Keil

Post by Maxxie »

Hello,
I am using ChibiOS_2.4.3\demos\ARMCM3-STM32F107\keil. There are a lot of mistakes in files paths for every ch.uvproj file. I have changed default paths for vectors.s and nvic.c. Also 137: #include "..\..\common\ARMCMx\nvic.h" in chcore.h.
Finally I have:
linking...
.\obj\ch.axf: Error: L6218E: Undefined symbol tmInit (referred from hal.o).
Target not created

Whats wrong?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Starting ChibiOS on STM32F107 with Keil

Post by Giovanni »

Hi,

I will look in the wrong paths, the missing symbol is because the "TM" subsystem is enabled in halconf.h but not included in the project, you may simply disable it in halconf.h.

Giovanni
Maxxie
Posts: 21
Joined: Mon Mar 18, 2013 2:56 pm

Re: [TODO] Starting ChibiOS on STM32F107 with Keil

Post by Maxxie »

Yes, it become Ok when I added tm.c and tm.h to project. Thanks!

Now I have some mistery with chcore.h, 137: #include "nvic.h" not works, only #include "..\..\common\ARMCMx\nvic.h". But for ARMCM3-STM32F103 demo both are Ok.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [TODO] Starting ChibiOS on STM32F107 with Keil

Post by Giovanni »

That is a missing include search path in the project. Headers should never be referenced by path.

Giovanni
Maxxie
Posts: 21
Joined: Mon Mar 18, 2013 2:56 pm

Re: [TODO] Starting ChibiOS on STM32F107 with Keil

Post by Maxxie »

Thanks!
Now I have assembled ChibiOS with lwIP. Its my first job with lwIP as well as with ChibiOS :)
Unfortunately during initialization the run going to chSysHalt() on STM32/mac_lld.c: 149. I cannot understand the function of this code clearly and why the board may be qualified as wrong or defective.
Maxxie
Posts: 21
Joined: Mon Mar 18, 2013 2:56 pm

Re: [TODO] Starting ChibiOS on STM32F107 with Keil

Post by Maxxie »

My board contain KS8721BL as PHY, what is coresponding to STM32-P107 Rev. B.
Maxxie
Posts: 21
Joined: Mon Mar 18, 2013 2:56 pm

Re: [TODO] Starting ChibiOS on STM32F107 with Keil

Post by Maxxie »

Solved :) I just changed #define BOARD_PHY_ID to MII_KS8721_ID in board.h
Maxxie
Posts: 21
Joined: Mon Mar 18, 2013 2:56 pm

Re: [TODO] Starting ChibiOS on STM32F107 with Keil

Post by Maxxie »

But Ethernet does not work :(

low_level_input(struct netif *netif) сalled only once at startup and never more. macWaitReceiveDescriptor() did not return any frame but the device connected to the network and receive frames. The understanding of Ethenret functionality is still bit complex for me, please help.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: [TODO] Starting ChibiOS on STM32F107 with Keil

Post by Giovanni »

Hi,

If you are in a hurry consider using ChibiStudio in order to try the demo. I will look into the Keil project problems over the weekend.

Giovanni
Maxxie
Posts: 21
Joined: Mon Mar 18, 2013 2:56 pm

Re: [TODO] Starting ChibiOS on STM32F107 with Keil

Post by Maxxie »

I am not sure that this problem caused by Keil itself. Much more by my board or Demo code.
Post Reply