Uwe Hermann
8a630baea8
Finish rename to 'miniblink'.
16 years ago
Uwe Hermann
05ccc0614a
Move the 'blink' example into a 'miniblink' subdirectory.
16 years ago
Uwe Hermann
db0e59da96
Rename example subdir to examples, we'll have more than one.
16 years ago
Uwe Hermann
4f43d8c622
Fix some compiler warnings.
16 years ago
Uwe Hermann
50b1b50676
Add slightly modified rcc.c file, contributed by Federico Ruiz-Ugalde.
16 years ago
Uwe Hermann
07b6ca3a90
Add RCC_CSR bit definitions and a osc_t enum.
16 years ago
Uwe Hermann
5cdbb466fa
Make example code build again (s/RCC_IOPCEN/IOPCEN).
16 years ago
Uwe Hermann
3eb5397d8d
Add RCC_BDCR bit definitions.
16 years ago
Uwe Hermann
df399e248b
Add RCC_APB1ENR bit definitions.
16 years ago
Uwe Hermann
af9302d2b0
Merge some more RCC related #defines contributed by Federico Ruiz-Ugalde.
Addition of remaining (mostly "connectivity line" STMs related) #defines
was done by me.
16 years ago
Uwe Hermann
b888530345
Whitespace fixes.
16 years ago
Uwe Hermann
2c1fa8bd67
Partial merge of RCC support work contributed by Federico Ruiz-Ugalde.
For now, this adds a bunch of #defines, double-checked against the
datasheet by me (added a few missing values for "connectivity line" STM32s).
16 years ago
Uwe Hermann
3bef8767f9
Add gpio_get() API function.
16 years ago
Uwe Hermann
83f5c58eb9
Switch the license to GPL, version 3 or later.
16 years ago
Uwe Hermann
74db299094
Add examples for LED blinking code, both, manually and using the API.
16 years ago
Uwe Hermann
3262983d27
Add initial GPIO API implementation.
This currently includes a number of basic functions. Example usage:
gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_2_MHZ,
GPIO_CNF_OUTPUT_PUSHPULL, GPIO12);
gpio_set(GPIOB, GPIO4);
gpio_clear(GPIOG, GPIO2 | GPIO9);
gpio_toggle(GPIOA, GPIO7);
reg16 = gpio_port_read(GPIOD);
gpio_port_write(GPIOF, 0xc8fe);
16 years ago
Uwe Hermann
d43224acfb
Update example application README wrt flashing instructions.
16 years ago
Uwe Hermann
915d5bff90
Implement the simplest possible (working) blinking LED example application.
This is the first working example code which is tested on hardware.
The LED on the Olimex STM-H103 eval board is happily blinking.
We use a dummy "delay" function (basically a busy-waiting for-loop), which
will only work if you use -O0 in CFLAGS (-O2, -O3, or -Os will not work as
the compiler optimizes the loop away).
We use some arbitrary value for stack size (2 KB) and use main()
directly as the reset vector function. This will change later.
Also, we do the GPIO and clock init as well as the GPIO toggling for the
LED blinking fully "manually" for now, but there may be more higher-level
functions for doing that at some later date.
16 years ago
Uwe Hermann
355701525e
Add initial minimal rcc.h implementation (not complete).
16 years ago
Uwe Hermann
526cb01aaa
Silence OpenOCD per default, use V=1 for more verbose output.
16 years ago
Uwe Hermann
8d2190a86a
Have *.o files depend on Makefile, in case we change gcc -O values there.
16 years ago
Uwe Hermann
10890b3f15
Don't use OpenOCD's "resume" command, only "reset" will work correctly.
Also, make the 'flash' target depend on 'images'.
16 years ago
Uwe Hermann
3b6809413b
Remove one layer of indirection by killing unneeded #defines.
16 years ago
Uwe Hermann
d7ec6a2983
Make 'flash' target a bit more generic and drop absolute paths.
16 years ago
Uwe Hermann
015b046c1e
Merge stdint.h contents into common.h so we don't conflict with libc.
16 years ago
Uwe Hermann
cf7d4df189
Make OpenOCD location easily configurable by using a variable.
16 years ago
Uwe Hermann
f3d7eda380
Add convenience GPIOx #defines and MMIO GPIO register #defines.
16 years ago
Uwe Hermann
d6611f62dd
Add all base addresses for peripherals as per datasheet.
16 years ago
Uwe Hermann
e04cec3b5d
Add 'make flash' target using recent OpenOCD versions.
16 years ago
Uwe Hermann
9385e69344
Fix incorrect location of the board files of recent OpenOCD versions.
16 years ago
Uwe Hermann
f3ac624f22
Add common.h, currently containing MMIO accessor functions.
16 years ago
Uwe Hermann
e79dc2d65e
Add README for the example project.
16 years ago
Uwe Hermann
0fe49aadec
Document 'make V=1' usage.
16 years ago
Uwe Hermann
caeba0c631
Rename INCLUDEDIR to INCDIR for brevity.
16 years ago
Uwe Hermann
b6f7fa5715
Add missing .PHONY target.
16 years ago
Uwe Hermann
bdba3af3a6
Create bin, hex, srec, and list files for the example project.
16 years ago
Uwe Hermann
dc4a6a66ba
Add .gitignore file.
16 years ago
Uwe Hermann
3a2c63129e
Use a Linux kernel style build output printing.
Example:
$ make install
BUILD lib
CC gpio.o
AR libopenstm32.a
BUILD example
CC blink.o
LD blink
INSTALL headers
INSTALL lib
$ make clean
CLEAN blink.o
CLEAN blink
CLEAN gpio.o
CLEAN libopenstm32.a
16 years ago
Uwe Hermann
1c459b8c48
Add 'make V=1' support for the example blink code.
16 years ago
Uwe Hermann
f0661cb343
Make default build silent, use 'make V=1' for verbose build.
16 years ago
Uwe Hermann
0efee48451
Add first example project (framework) using libopenstm32.
This is intended as a small blink example for the Olimex STM32-H103 board.
It doesn't do anything useful (yet), but it builds fine.
There's a sample Makefile and a preliminary ld script (which probably
needs some more work).
16 years ago
Uwe Hermann
c62ca6143d
Make gpio number argument 'unsigned int', there are no negative GPIOs.
16 years ago
Uwe Hermann
0fa4cbbdad
Add some more GPIO related #defines.
This includes GPIO port base addresses, MODE[1:0] values, and CNF[1:0]
values.
16 years ago
Uwe Hermann
e7567c835c
Add memorymap.h with some peripheral base addresses.
16 years ago
Uwe Hermann
0a8135395a
Add dummy gpio.c implementation and final Makefile.
The whole lib should now build and install fine. It's not yet tested
on hardware, though.
16 years ago
Uwe Hermann
1b2f6456bf
Add some initial gpio.h #defines.
16 years ago
Uwe Hermann
75bb51fadf
Add top-level include file intended for lib users.
16 years ago
Uwe Hermann
ae6f321816
Add a stdint.h include file for u16, u32, etc.
16 years ago
Uwe Hermann
74620a94d0
Add initial top-level Makefile.
16 years ago
Uwe Hermann
1b708b68b6
Drop 's' from https, no need for encryption here.
16 years ago