Commit Graph

83 Commits

Author SHA1 Message Date
Karl Palsson
bcd7d57c11 make flash: overhaul openocd configuration
Instead of OOCD_SERIAL triggering an attempt to use a specific ftdi based
adapter, introduce common target/interface pairs, OOCD_INTERFACE and
OOCD_TARGET, and an override via OOCD_FILE allowing full control.

Further, attempt to connect to a running openocd instance to flash if possible.
This _will not_ work well if you have multiple openocd instances open at once,
but that's a rare use case.

Examples:
OOCD_INTERFACE=stlink-v2
OOCD_TARGET=stm32f0x
 --> openocd ... -f interface/stlink-v2.cfg -f target/stm32f0x.cfg)

OOCD_FILE=board/ek-lm4f120xl.cfg
 --> openocd ... -f $(OOCD_FILE)  (ie, the variable is passed untouched)

As part of implementing this, correct variables that were always wrong, and
update the openocd flashing commands to use current commands.
2016-08-18 22:41:23 +00:00
Karl Palsson
b227e1609c rules: provide default C and C++ standards
Default CSTD to c99, no default for CXXSTD, but if provided it will be used.

Add required gnu99 flags to projects using gnu styles.
2016-08-18 22:41:23 +00:00
Karl Palsson
30667fe62c rules: rename file only.
Trivial rename, allow vim to properly detect the file as a makefile.
2016-08-18 22:41:23 +00:00
Karl Palsson
b5fcf55005 stm32f4: switch two examples to linker generation
Proves that the tree can have projects specifying the linker script explicitly,
and also "modern" projects specifying simply the DEVICE= variable.
2016-08-18 22:41:23 +00:00
Trevor Woerner
a5641ab63e cookie_io fixes for gcc-5.3
Using the latest (as of today) gcc-arm-embedded toolchain caused two build
failures similar to:

	error: unknown type name 'cookie_io_functions_t'

These custom IO functions are now protected by a define, so define _GNU_SOURCE
which enables all such areas. This is a libc issue.

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2016-06-17 10:31:56 -04:00
Karl Palsson
8924042d2a stm32f4: timer: correct misleading comments.
Code was correct, comment was badly imported.
2016-05-03 21:14:09 +00:00
Karl Palsson
9f8d37d8c8 stm32f4: usb midi: use unique serial numbers
The unique serial number from the device unique signature block was never used
in any examples.  Add it to the these two usb midi examples, to have a user for
this api available for reference.
2016-04-11 23:24:23 +00:00
Karl Palsson
2092a6759d update libopencm3
This brings in the new ADC api for STM32 parts.

Update to new standardized ADC apis.
Drops pointless channel definitions, uses common names for common functions.
No functional changes.

Based on work in: https://github.com/libopencm3/libopencm3-examples/pull/130
2016-04-10 13:49:07 +00:00
Fabian Bartschke
ec1d59e344 stm32f4-discovery: correct part number for alternatives
STM32F401 Discovery is labelled MB1115B:
http://www.st.com/stm32f401discovery
2016-01-21 00:08:11 +00:00
Piotr Esden-Tempski
976720c355 Updated libopencm3 to current master. Made all examples compile again.
Be specifically careful with the usb examples. There is likely some
breakage to be expected, not sure I updated all the drivers to the
correct types for the respective chips.
2015-12-15 00:56:25 +01:00
Andrew Chen
2314635cf0 Makefile.include: don't override DEFS
Allow examples (such as usart-semihosting) to set DEFS for their own use,
and _then_ add the target definitions.
2015-12-10 15:51:57 +00:00
Piotr Esden-Tempski
c6af45ba8f [nucleo-f411re] Stylefix. 2015-02-24 19:47:28 -08:00
Chuck McManis
d90d72291a USART with Standard I/O
This example takes advantage of the big Flash memory space and
uses the standard library functions printf, and fgets to
implement a simple interactive application.
2015-02-24 19:44:14 -08:00
Chuck McManis
4837775449 Nucleo F411RE - Simple USART example
Same as the one for other boards
2015-02-24 19:44:14 -08:00
Chuck McManis
8019726f51 Nucleo Examples F411RE 2015-02-24 19:44:14 -08:00
kbob
9cee61f089 [stm32f429i-discovery] Added LTDC DMA example.
This example is just using buffers and built in alpha overlay
functionality to animate a dmond floating on a checker board. After
initializing of the frame buffers only 7 registers are being modified to
implement the animation.
2015-02-24 17:14:57 -08:00
Chuck McManis
22f59c4583 LCD version of the Mandelbrot example
This version is the ASCII one but uses the LCD display
that is attached to the board for a more colorful result.

This example also zooms into a more "interesting" place in the set so
the display stays interesting during the full 100 generations.
2015-02-16 18:13:28 -08:00
Piotr Esden-Tempski
4de8d15303 [stm32f4-discovery] Using WFI instead of nop in the main loop.
WFI (Wait for Interrupt) tells the processor to suspend untill the next
interrupt is called. Better than burning away the cycles with nop.
2015-02-13 16:41:18 -08:00
Piotr Esden-Tempski
ec7c0f318b [stm32f4-discovery] Added timer example for the stm32f4 discovery board. 2015-02-13 16:41:18 -08:00
Piotr Esden-Tempski
51dda90570 [stm32f429i-discovery] Replaced the ctrl-c handler in console for a shorter version.
Thanks to ChuckM for that.
2015-02-05 16:34:36 -08:00
Piotr Esden-Tempski
8c6eb9ca57 [stm32f429-discovery] General sweep to fix style according to make stylecheck. 2015-02-04 20:39:32 -08:00
Piotr Esden-Tempski
c06aba1603 Removed the use of ITM_Sendchar. 2015-02-04 17:07:57 -08:00
Chuck McManis
0a863789b0 Additional cleanup on lcd-serial
Remove the ISR function and remains of the hack in lcd-spi.c and
convert console.c to use the LOC3 system reset code rather than
the hack which only works on the F4 as it turns out.
2015-02-04 16:48:36 -08:00
Chuck McManis
5379525a87 Updated the LCD SPI
Now that I know a bit more about how SPI is working on the STM32F4
I removed the egregious hack and replaced it with some cleaner code
for driving the LCD. On the positive side it gets a faster update
rate on the screen.
2015-02-04 16:48:18 -08:00
Chuck McManis
b76c30cdb0 Fixups 2015-02-04 16:34:03 -08:00
Piotr Esden-Tempski
d29e4d2b7c [stm32f429i-discovery] Moved Chucks remaining examples to the correct directory.
Additionally added Chucks readme to the stm32f429i-discovery board
readme.
2015-01-22 18:38:16 -08:00
Piotr Esden-Tempski
86c42bc2dd [stm32f429i-discovery] Switched over to UART1.
UART1 is connected through two jumpers to the programmer chip on the
board. Making the use of it very streight forward.
2015-01-22 18:27:28 -08:00
Piotr Esden-Tempski
d6cb05d792 [stm32f429i-discovery] Moved Chucks usart irq example to usart irq console.
Chucks irq example is more elaborate than the ported one so we keep
both.
2015-01-22 16:08:28 -08:00
Piotr Esden-Tempski
fbcb1ca66e [stm32f429i-discovery] Moved Chucks example to usart_console
Chucks example is more elaborate than the simple ported example so we
keep both.
2015-01-22 16:05:48 -08:00
Piotr Esden-Tempski
ed4bec540c [stm32f429i-discovery] Removed Chucks blink example. 2015-01-22 15:57:20 -08:00
Piotr Esden-Tempski
c18a16d979 [stm32f429i-discovery] Merge and delete systick blink example.
Added Chucks improvements to the systick example into the ported one.
2015-01-22 15:51:20 -08:00
kbob
7629bb01e6 Switched from USART 2 to USART 1. 2015-01-21 02:00:08 -08:00
Piotr Esden-Tempski
71b2c1991f [style] Trailing white space fixes. 2015-01-20 16:27:50 -08:00
Piotr Esden-Tempski
ea5af55b92 [stm32f4-discovery] Reverted addition of console. 2015-01-20 16:18:43 -08:00
Chuck McManis
a3ff2c9250 Intermediate step in the examples tree, looking to get USB working correctly on the
429 still
2015-01-20 16:12:57 -08:00
cmcmanis
e4d106dce6 Updated to use the new rcc_periph_clock_enable code 2015-01-20 16:12:57 -08:00
cmcmanis
ae9c116e30 Pulling in some of the makefile changes that are in master into this
branch to make merging easier later on.
2015-01-20 16:12:56 -08:00
cmcmanis
4defd3e1d2 The SPI-MEMS example, its not great but it does use the SPI
port and can tell you the temperature of the room you are in.
2015-01-20 16:12:56 -08:00
cmcmanis
e5585dd07d Some examples for the STM32F4-Disco board 2015-01-20 16:12:56 -08:00
Piotr Esden-Tempski
2583cc54cc [rcc_periph_clock_enable] Using the new rcc enable format.
We are missing handling of stm32l1 AHBLP clock rail.
2015-01-20 15:33:00 -08:00
Piotr Esden-Tempski
1c4ae95729 [README] Coarse sweep to use markup in READMEs.
This should improve online readability of the readme files.
2015-01-19 19:20:12 -08:00
Piotr Esden-Tempski
ab7efee88e [README] Renamed all readme files to indicate markup format. 2015-01-19 19:19:42 -08:00
Piotr Esden-Tempski
ddd5d5a918 [copyright] Updated copyright credits on some newly added files.
We need to go through all the examples and make sure we credit them
accordingly.
2015-01-15 17:09:30 -08:00
Piotr Esden-Tempski
1120b3f1b5 [stm32f429i-discovery] Added toplevel README. 2015-01-15 16:59:39 -08:00
Piotr Esden-Tempski
4f1db00763 [stm32f429i-discovery] Added adc-dac-printf example. 2015-01-15 01:58:25 -08:00
Piotr Esden-Tempski
016923e654 [stm32f429i-discovery] Added dac dma example. 2015-01-15 01:06:48 -08:00
Piotr Esden-Tempski
dfac3be665 [stm32f429i-discovery] Added mandelbrot set example. 2015-01-14 18:51:45 -08:00
Piotr Esden-Tempski
ddd0312b10 [stm32f429i-discovery] Added random blinking example. 2015-01-14 18:44:04 -08:00
Piotr Esden-Tempski
1346cd0156 [stm32f429i-discovery] Added usb mass storage example. 2015-01-14 18:43:39 -08:00
Piotr Esden-Tempski
92c228bc63 [stm32f429i-discovery] Added usb cdcacm example. 2015-01-14 18:35:07 -08:00