Starting to add Nucleo F334R8

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

Moderator: RoccoMarco

User avatar
jcw
Posts: 55
Joined: Thu May 23, 2013 12:59 am

Starting to add Nucleo F334R8

Post by jcw »

I noticed that the STM32F334 wasn't in the list of chips yet, so I started adding the necessary headers - I basically started from the STM32F30x files and the Nucleo F103RB board files, assuming that these would be closest to the desired result.

Going fine so far, but I'm hitting an error I can't quite figure out...

Code: Select all

Compiling hal.c                                                                         
In file included from ../chibios/os/hal/include/st.h:50:0,                             
                 from ../chibios/os/hal/include/hal.h:64,                             
                 from ../chibios/os/hal/src/hal.c:29:                                 
../chibios/os/hal/ports/STM32/LLD/TIMv1/st_lld.h:69:2: error: #error "TIM2 not present"
 #error "TIM2 not present"                                                             


I suspect that somewhere there's still an old path reference lurking in there?

(Feel free to add into the repo, of course - I can resubmit once this is solved)

-jcw
Attachments
st334.diff.zip
(35.06 KiB) Downloaded 421 times
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Starting to add Nucleo F334R8

Post by Giovanni »

The F334 should already be supported after the inclusion of the new headers, isn't it? you have to use the same paths of the F30x (which should be renamed to F3xx).

Giovanni
User avatar
jcw
Posts: 55
Joined: Thu May 23, 2013 12:59 am

Re: Starting to add Nucleo F334R8

Post by jcw »

Ah - I was confused because there is an F30x and an F37x, so I thought the logical step would be to add F33x?

Ok, I'll try the F30x route, thanks.

-jcw
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Starting to add Nucleo F334R8

Post by Giovanni »

F37x is a special case, it is different from the others. All other devices have the same clock tree and a common set of peripherals.

Giovanni
User avatar
jcw
Posts: 55
Joined: Thu May 23, 2013 12:59 am

Re: Starting to add Nucleo F334R8

Post by jcw »

No joy, I'm still getting the "TIM2 not present" error.

Attached the board definitions I'm now using, along with these lines in my Makefile:

Code: Select all

include $(CHIBIOS)/os/hal/boards/ST_NUCLEO_F334R8/board.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F30x/platform.mk
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f30x.mk

# Define linker script file here
LDSCRIPT= $(PORTLD)/STM32F334x8.ld


FWIW, the "STM32F334x8.ld" file is as follows, though that point is not being reached yet:

Code: Select all

MEMORY
{
    flash : org = 0x08000000, len = 64k
    ram : org = 0x20000000, len = 12k
    ccmram : org = 0x10000000, len = 4k
}

INCLUDE rules.ld


What am I missing? I do not see any substantial differences between ST_NUCLEO_F334R8 and say ST_NUCLEO_F401RE board files.

-jcw
Attachments
ST_NUCLEO_F334R8.zip
(9.15 KiB) Downloaded 437 times
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Starting to add Nucleo F334R8

Post by Giovanni »

Is the device identification macro correct?
User avatar
jcw
Posts: 55
Joined: Thu May 23, 2013 12:59 am

Re: Starting to add Nucleo F334R8

Post by jcw »

I think so, this is in STM32F30x/cmparams.h:

Code: Select all

#if !defined (STM32F301x8) && !defined (STM32F318xx) &&                     \
    !defined (STM32F302x8) && !defined (STM32F302xC) &&                     \
    !defined (STM32F303x8) && !defined (STM32F303xC) &&                     \
    !defined (STM32F358xx) && !defined (STM32F334x8) &&                     \
    !defined (STM32F328xx)
#include "board.h"
#endif


This is in my project: #define STM32F30x_MCUCONF

And this is in ST_NUCLEO_F334R8/board.h: #define STM32F334x8

-jcw
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Starting to add Nucleo F334R8

Post by Giovanni »

I am porting the Nucleo demos to 3.0 and did some rework on the F3 HAL, I will give F334 a try in the weekend.

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

Re: Starting to add Nucleo F334R8

Post by Giovanni »

Found the problem with the F334, added a demo but it is untested.

Giovanni
User avatar
jcw
Posts: 55
Joined: Thu May 23, 2013 12:59 am

Re: Starting to add Nucleo F334R8

Post by jcw »

Woohoo - the demo and my test project are now compiling! Will test further soon, thank you!

-jcw
Post Reply