Page 1 of 4
[DONE] Starting ChibiOS on STM32F107 with Keil
Posted: Mon Mar 18, 2013 3:03 pm
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?
Re: Starting ChibiOS on STM32F107 with Keil
Posted: Mon Mar 18, 2013 4:38 pm
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
Re: [TODO] Starting ChibiOS on STM32F107 with Keil
Posted: Mon Mar 18, 2013 4:53 pm
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.
Re: [TODO] Starting ChibiOS on STM32F107 with Keil
Posted: Mon Mar 18, 2013 4:59 pm
by Giovanni
That is a missing include search path in the project. Headers should never be referenced by path.
Giovanni
Re: [TODO] Starting ChibiOS on STM32F107 with Keil
Posted: Tue Mar 19, 2013 7:21 pm
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.
Re: [TODO] Starting ChibiOS on STM32F107 with Keil
Posted: Tue Mar 19, 2013 7:49 pm
by Maxxie
My board contain KS8721BL as PHY, what is coresponding to STM32-P107 Rev. B.
Re: [TODO] Starting ChibiOS on STM32F107 with Keil
Posted: Tue Mar 19, 2013 7:53 pm
by Maxxie
Solved

I just changed
#define BOARD_PHY_ID to
MII_KS8721_ID in
board.h
Re: [TODO] Starting ChibiOS on STM32F107 with Keil
Posted: Wed Mar 20, 2013 3:36 pm
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.
Re: [TODO] Starting ChibiOS on STM32F107 with Keil
Posted: Wed Mar 20, 2013 4:44 pm
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
Re: [TODO] Starting ChibiOS on STM32F107 with Keil
Posted: Wed Mar 20, 2013 5:24 pm
by Maxxie
I am not sure that this problem caused by Keil itself. Much more by
my board or Demo code.