Closed Gregwar closed 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.
Ok, thanks for your information Do you plan to release a maplemini-like board featuring stm32f4?
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.
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?
Thanks @mbolivar I will use your changes soon May I open a new PR then?
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.
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:
nucleo
board.hex
in thebuild/
directory, which is required in order to flash the board via JTAG & OpenOCDnone
bootloader, that write everything at0x08000000
(Nucleo features a JTAG, so it's nicer to place BOOTLOADER tonone
that typingmake jtag
everytime)HAS_EXTERNAL_OSC
in the Makefile (default to yes) that can disable the external oscillator and use the internal one (running the board at 36mhz). This is because the Nucleo doesn't have an external oscillator (you can solder one, though)