leaflabs / libmaple

[INACTIVE] C and C++ library for STM32 ARM Cortex-M3 development boards.
http://leaflabs.com/docs/libmaple.html
Other
304 stars 218 forks source link

Nucleo #102

Closed Gregwar closed 10 years ago

Gregwar commented 10 years ago

Hello,

This adds a first support for the NUCLEO F103RB board:

The code have been tested on an actual board, blinking the led and using Serial2 to communicate via the ST-LINK works

Mainly, these commits adds:

mbolivar commented 10 years ago

I'll dig up the patches you'll need to do this in a nicer way and test them a little better to try to merge them. I never did because they were a fairly invasive rework of libmaple proper to add STM32F4 support, and I didn't have time to test that they didn't break anything for STM32F1. This will get rid of some of the parts of the library that are really not nice so you don't have to resort to tactics like HAVE_EXTERNAL_OSC.

Gregwar commented 10 years ago

Ok, thanks for your information Do you plan to release a maplemini-like board featuring stm32f4?

mbolivar commented 10 years ago

We're not working on any new Maple boards; this work was done for internal use on another project.

On Thu, Nov 13, 2014 at 2:10 AM, Grégoire Passault <notifications@github.com

wrote:

Ok, thanks for your information Do you plan to release a maplemini-like board featuring stm32f4?

— Reply to this email directly or view it on GitHub https://github.com/leaflabs/libmaple/pull/102#issuecomment-62850499.

mbolivar commented 10 years ago

OK, I've pushed df44924 and 630e2ce, which should be enough for you to override the clock configuration by just defining your own functions and PLL config variables in your board.cpp (see the new wirish::priv:: routines called by init()).

Please let me know if this doesn't work for you. I think we need to rename the wirish::priv:: namespace to wirish::, since this isn't exactly private anymore (as boards are overriding it). If this patchset works to enable your board without touching any of the libmaple core, please submit a PR and I'll put a patch on top that removes all the priv::'s.

(I think this should be enough, as we've used it to enable boards without external oscillators before, but there might be a little bit of glue missing. See w_board_pll_in_clk, w_board_pll_cfg, and board_setup_clock_prescalers()).

Regarding STM32_PCLKx, is the CFLAGS solution enough for you? Or will it cause extra headaches for you or your users?

Gregwar commented 10 years ago

Thanks @mbolivar I will use your changes soon May I open a new PR then?

mbolivar commented 10 years ago

Yes, please do.

On Sun, Nov 16, 2014 at 3:37 PM, Grégoire Passault <notifications@github.com

wrote:

Thanks @mbolivar https://github.com/mbolivar I will use your changes soon May I open a new PR then?

— Reply to this email directly or view it on GitHub https://github.com/leaflabs/libmaple/pull/102#issuecomment-63237734.