Version 0.10
This commit is contained in:
7
AUTHORS
7
AUTHORS
@@ -2,7 +2,6 @@ Kaz Kojima:
|
|||||||
Added STM32 Primer2 support:
|
Added STM32 Primer2 support:
|
||||||
boards/STM32_PRIMER2/board.c
|
boards/STM32_PRIMER2/board.c
|
||||||
boards/STM32_PRIMER2/board.h
|
boards/STM32_PRIMER2/board.h
|
||||||
boards/STM32_PRIMER2/board.mk
|
|
||||||
boards/STM32_PRIMER2/mcuconf.h
|
boards/STM32_PRIMER2/mcuconf.h
|
||||||
|
|
||||||
NIIBE Yutaka:
|
NIIBE Yutaka:
|
||||||
@@ -10,22 +9,18 @@ NIIBE Yutaka:
|
|||||||
Added STBee support:
|
Added STBee support:
|
||||||
boards/STBEE/board.c
|
boards/STBEE/board.c
|
||||||
boards/STBEE/board.h
|
boards/STBEE/board.h
|
||||||
boards/STBEE/board.mk
|
|
||||||
boards/STBEE/mcuconf.h
|
boards/STBEE/mcuconf.h
|
||||||
Added STM8S Discovery Kit support:
|
Added STM8S Discovery Kit support:
|
||||||
boards/STM8S_DISCOVERY/board.c
|
boards/STM8S_DISCOVERY/board.c
|
||||||
boards/STM8S_DISCOVERY/board.h
|
boards/STM8S_DISCOVERY/board.h
|
||||||
boards/STM8S_DISCOVERY/board.mk
|
boards/STM8S_DISCOVERY/mcuconf.h
|
||||||
boards/STM8S_DISCOVERY/mcuconf.mk
|
|
||||||
Added STBee Mini support:
|
Added STBee Mini support:
|
||||||
boards/STBEE_MINI/board.c
|
boards/STBEE_MINI/board.c
|
||||||
boards/STBEE_MINI/board.h
|
boards/STBEE_MINI/board.h
|
||||||
boards/STBEE_MINI/board.mk
|
|
||||||
boards/STBEE_MINI/mcuconf.h
|
boards/STBEE_MINI/mcuconf.h
|
||||||
Added CQ STARM support:
|
Added CQ STARM support:
|
||||||
boards/CQ_STARM/board.c
|
boards/CQ_STARM/board.c
|
||||||
boards/CQ_STARM/board.h
|
boards/CQ_STARM/board.h
|
||||||
boards/CQ_STARM/board.mk
|
|
||||||
boards/CQ_STARM/mcuconf.h
|
boards/CQ_STARM/mcuconf.h
|
||||||
Wrote tools for DfuSe:
|
Wrote tools for DfuSe:
|
||||||
tool/dfuse.py
|
tool/dfuse.py
|
||||||
|
|||||||
14
ChangeLog
14
ChangeLog
@@ -1,3 +1,17 @@
|
|||||||
|
2011-02-10 NIIBE Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
|
* Version 0.10.
|
||||||
|
|
||||||
|
* src/configure, src/Makefile.in (BOARD_DIR): New.
|
||||||
|
|
||||||
|
* boards/CQ_STARM/board.mk, boards/OLIMEX_STM32_H103/board.mk:
|
||||||
|
Removed.
|
||||||
|
* boards/STBEE/board.mk, boards/STBEE_MINI/board.mk: Removed.
|
||||||
|
* boards/STM32_PRIMER2/board.mk, boards/STM8S_DISCOVERY/board.mk:
|
||||||
|
Removed.
|
||||||
|
|
||||||
|
* src/Makefile.in (OUTFILES): Don't include random_bits.
|
||||||
|
|
||||||
2011-02-09 NIIBE Yutaka <gniibe@fsij.org>
|
2011-02-09 NIIBE Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
* src/usb_prop.c (gnukStringSerial): Updated.
|
* src/usb_prop.c (gnukStringSerial): Updated.
|
||||||
|
|||||||
23
NEWS
23
NEWS
@@ -1,5 +1,24 @@
|
|||||||
Gnuk NEWS - User visible changes
|
Gnuk NEWS - User visible changes
|
||||||
|
|
||||||
|
* Major changes in Gnuk 0.10
|
||||||
|
|
||||||
|
Released 2011-02-10, by NIIBE Yutaka
|
||||||
|
|
||||||
|
** The executable can be installed to multiple devices.
|
||||||
|
So far, users of Gnuk should have not shared single executable among
|
||||||
|
multiple devices because the executable includes random bits (or
|
||||||
|
fixed serial number). Now, random_bits and fixed serial number are
|
||||||
|
configured *after* compilation, we can install single executable image
|
||||||
|
to multiple devices. Note that we need to configure random_bits for
|
||||||
|
each device.
|
||||||
|
|
||||||
|
** Removed configure option: --with-fixed-serial
|
||||||
|
It is not compile time option any more. After installation, we can
|
||||||
|
modify serial number in AID by tool/gnuk_put_binary.py. Modification
|
||||||
|
is possible only once. If you don't modify, Gnuk uses unique chip ID
|
||||||
|
of STM32 processor for AID.
|
||||||
|
|
||||||
|
|
||||||
* Major changes in Gnuk 0.9
|
* Major changes in Gnuk 0.9
|
||||||
|
|
||||||
Released 2011-02-01, by NIIBE Yutaka
|
Released 2011-02-01, by NIIBE Yutaka
|
||||||
@@ -15,8 +34,8 @@ changes in Gnuk, it could be relatively easily possible to support
|
|||||||
Gnuk Token by OpenSC with a few changes to libopensc/card-openpgp.c,
|
Gnuk Token by OpenSC with a few changes to libopensc/card-openpgp.c,
|
||||||
and libopensc/pkcs15-openpgp.c.
|
and libopensc/pkcs15-openpgp.c.
|
||||||
|
|
||||||
** New board support "STBEE"
|
** New board support "STBee"
|
||||||
STBEE is a board by Strawberry Linux Co., Ltd., and it has
|
STBee is a board by Strawberry Linux Co., Ltd., and it has
|
||||||
STM32F103VET6 on the board. The chip is High Density CPU with 512KB
|
STM32F103VET6 on the board. The chip is High Density CPU with 512KB
|
||||||
flash memory and many I/O. If you want to connect sensor, display,
|
flash memory and many I/O. If you want to connect sensor, display,
|
||||||
etc., this board would be a good candidate.
|
etc., this board would be a good candidate.
|
||||||
|
|||||||
102
README
102
README
@@ -1,7 +1,7 @@
|
|||||||
Gnuk - software for GPG USB Token
|
Gnuk - software for GPG USB Token
|
||||||
|
|
||||||
Version 0.9
|
Version 0.10
|
||||||
2011-02-01
|
2011-02-10
|
||||||
Niibe Yutaka
|
Niibe Yutaka
|
||||||
Free Software Initiative of Japan
|
Free Software Initiative of Japan
|
||||||
|
|
||||||
@@ -26,8 +26,11 @@ USB Token by Gnuk everywhere.
|
|||||||
Release notes
|
Release notes
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is tenth release of Gnuk. While it works well for specific
|
This is eleventh release of Gnuk. While it works well for specific
|
||||||
usages, it is still experimental.
|
usages, it is still experimental. Note that you need to write random
|
||||||
|
bits after installation of gnuk executable to the chip from this
|
||||||
|
release. This procedure is required to share a single executable
|
||||||
|
among multiple devices.
|
||||||
|
|
||||||
Tested features are:
|
Tested features are:
|
||||||
|
|
||||||
@@ -72,6 +75,7 @@ Not supported feature(s):
|
|||||||
|
|
||||||
* Overriding key import. You need to remove all keys first.
|
* Overriding key import. You need to remove all keys first.
|
||||||
|
|
||||||
|
* Key generation
|
||||||
|
|
||||||
Targets
|
Targets
|
||||||
=======
|
=======
|
||||||
@@ -185,18 +189,11 @@ Type:
|
|||||||
|
|
||||||
$ make
|
$ make
|
||||||
|
|
||||||
In the make process, it takes time for the command of
|
|
||||||
|
|
||||||
dd if=/dev/random bs=1 of=random_bits count=1024
|
|
||||||
|
|
||||||
Don't just wait, but do some other work on your PC.
|
|
||||||
/dev/random needs entropy to finish.
|
|
||||||
|
|
||||||
Then, we will have "gnuk.elf".
|
Then, we will have "gnuk.elf".
|
||||||
|
|
||||||
|
|
||||||
How to run
|
How to install
|
||||||
==========
|
==============
|
||||||
|
|
||||||
Olimex STM32-H103 board
|
Olimex STM32-H103 board
|
||||||
-----------------------
|
-----------------------
|
||||||
@@ -222,9 +219,21 @@ If you are using FTDI-2232D module and the connection is standard, type:
|
|||||||
|
|
||||||
$ openocd -f interface/openocd-usb.cfg -f target/stm32.cfg
|
$ openocd -f interface/openocd-usb.cfg -f target/stm32.cfg
|
||||||
|
|
||||||
Then, invoke telnet to connect OpenCD and write image as above example
|
Initially, the flash ROM of the chip is protected. you need to do:
|
||||||
of Olimex STM32-H103.
|
|
||||||
|
$ telnet localhost 4444
|
||||||
|
> reset halt
|
||||||
|
> stm32x unlock 0
|
||||||
|
> reset
|
||||||
|
> shutdown
|
||||||
|
$
|
||||||
|
|
||||||
|
and re-connect the board. Note that power-off / power-on sequence is
|
||||||
|
required to reset flash ROM.
|
||||||
|
|
||||||
|
Then, invoke OpenOCD again and telnet to connect OpenCD and write
|
||||||
|
image as above example of Olimex STM32-H103.
|
||||||
|
|
||||||
|
|
||||||
CQ STARM
|
CQ STARM
|
||||||
--------
|
--------
|
||||||
@@ -249,6 +258,67 @@ to flash:
|
|||||||
Then, reset the board.
|
Then, reset the board.
|
||||||
|
|
||||||
|
|
||||||
|
How to protect flash ROM
|
||||||
|
========================
|
||||||
|
|
||||||
|
Invoke your OpenOCD and type:
|
||||||
|
|
||||||
|
$ telnet localhost 4444
|
||||||
|
> reset halt
|
||||||
|
> stm32x lock 0
|
||||||
|
> reset
|
||||||
|
> shutdown
|
||||||
|
|
||||||
|
After power-off / power-on sequence, the contents of flash ROM cannot
|
||||||
|
be accessible from JTAG debugger.
|
||||||
|
|
||||||
|
Note that it would be still possible for some implementation of DfuSe
|
||||||
|
to access the contents. If you want to protect, killing DfuSe and
|
||||||
|
accessing by JTAG debugger is recommended.
|
||||||
|
|
||||||
|
|
||||||
|
How to configure
|
||||||
|
================
|
||||||
|
|
||||||
|
You need python and PyUSB (python-usb package in Debian).
|
||||||
|
|
||||||
|
(1) In the 'src' directory, type
|
||||||
|
|
||||||
|
$ make random_bits
|
||||||
|
|
||||||
|
In this process, it takes time for the command of
|
||||||
|
|
||||||
|
dd if=/dev/random bs=1 of=random_bits count=1024
|
||||||
|
|
||||||
|
Don't just wait, but do some other works on your PC.
|
||||||
|
/dev/random needs entropy to finish.
|
||||||
|
|
||||||
|
(2) Stop the pcsc daemon.
|
||||||
|
|
||||||
|
# /etc/init.d/pcscd stop
|
||||||
|
|
||||||
|
(3) Write the random bits to the device
|
||||||
|
|
||||||
|
Connect your board to USB port of your PC. And invoke gnuk_put_binary.py:
|
||||||
|
|
||||||
|
# ../tool/gnuk_put_binary.py -r random_bits random_bits: 1024
|
||||||
|
|
||||||
|
(4) [Optional] Write fixed serial number
|
||||||
|
|
||||||
|
If you use fixed serial number in the file 'GNUK_SERIAL_NUMBER', you can do:
|
||||||
|
|
||||||
|
# EMAIL=<YOUR-EMAIL-ADDRESS> ../tool/gnuk_put_binary.py -s ../GNUK_SERIAL_NUMBER
|
||||||
|
|
||||||
|
(5) [Optional] Write card holder certificate
|
||||||
|
|
||||||
|
If you have card holder certificate binary file, you can do:
|
||||||
|
|
||||||
|
# ../tool/gnuk_put_binary.py ../../<YOUR-CERTIFICATE>.bin
|
||||||
|
|
||||||
|
|
||||||
|
How to run
|
||||||
|
==========
|
||||||
|
|
||||||
Debug enabled
|
Debug enabled
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
# List of all the board related files.
|
|
||||||
BOARDSRC = ../boards/CQ_STARM/board.c \
|
|
||||||
../boards/common/hw_config.c
|
|
||||||
|
|
||||||
# Required include directories
|
|
||||||
BOARDINC = ../boards/CQ_STARM
|
|
||||||
@@ -1,43 +1,3 @@
|
|||||||
/*
|
|
||||||
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
|
|
||||||
|
|
||||||
This file is part of ChibiOS/RT.
|
|
||||||
|
|
||||||
ChibiOS/RT is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
ChibiOS/RT is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
A special exception to the GPL can be applied should you wish to distribute
|
|
||||||
a combined work that includes ChibiOS/RT, without being obliged to provide
|
|
||||||
the source code for any proprietary components. See the file exception.txt
|
|
||||||
for full details of how and when the exception can be applied.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* STM32 drivers configuration.
|
|
||||||
* The following settings override the default settings present in
|
|
||||||
* the various device driver implementation headers.
|
|
||||||
* Note that the settings for each driver only have effect if the driver
|
|
||||||
* is enabled in halconf.h.
|
|
||||||
*
|
|
||||||
* IRQ priorities:
|
|
||||||
* 15...0 Lowest...Highest.
|
|
||||||
*
|
|
||||||
* DMA priorities:
|
|
||||||
* 0...3 Lowest...Highest.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* HAL driver system settings.
|
* HAL driver system settings.
|
||||||
*/
|
*/
|
||||||
@@ -51,57 +11,4 @@
|
|||||||
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||||
#define STM32_MCO STM32_MCO_NOCLOCK
|
#define STM32_MCO STM32_MCO_NOCLOCK
|
||||||
|
|
||||||
/*
|
#include "mcuconf-common.h"
|
||||||
* ADC driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_ADC1 TRUE
|
|
||||||
#define STM32_ADC1_DMA_PRIORITY 3
|
|
||||||
#define STM32_ADC1_IRQ_PRIORITY 5
|
|
||||||
#define STM32_ADC1_DMA_ERROR_HOOK() chSysHalt()
|
|
||||||
|
|
||||||
/*
|
|
||||||
* CAN driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_CAN1 TRUE
|
|
||||||
#define STM32_CAN1_IRQ_PRIORITY 11
|
|
||||||
|
|
||||||
/*
|
|
||||||
* PWM driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_PWM1 TRUE
|
|
||||||
#define USE_STM32_PWM2 FALSE
|
|
||||||
#define USE_STM32_PWM3 FALSE
|
|
||||||
#define USE_STM32_PWM4 FALSE
|
|
||||||
#define STM32_PWM1_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM2_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM3_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM4_IRQ_PRIORITY 7
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SERIAL driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_USART1 FALSE
|
|
||||||
#define USE_STM32_USART2 TRUE
|
|
||||||
#define USE_STM32_USART3 FALSE
|
|
||||||
#if defined(STM32F10X_HD) || defined(STM32F10X_CL)
|
|
||||||
#define USE_STM32_UART4 FALSE
|
|
||||||
#define USE_STM32_UART5 FALSE
|
|
||||||
#endif
|
|
||||||
#define STM32_USART1_PRIORITY 12
|
|
||||||
#define STM32_USART2_PRIORITY 12
|
|
||||||
#define STM32_USART3_PRIORITY 12
|
|
||||||
#if defined(STM32F10X_HD) || defined(STM32F10X_CL)
|
|
||||||
#define STM32_UART4_PRIORITY 12
|
|
||||||
#define STM32_UART5_PRIORITY 12
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SPI driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_SPI1 TRUE
|
|
||||||
#define USE_STM32_SPI2 TRUE
|
|
||||||
#define STM32_SPI1_DMA_PRIORITY 2
|
|
||||||
#define STM32_SPI2_DMA_PRIORITY 2
|
|
||||||
#define STM32_SPI1_IRQ_PRIORITY 10
|
|
||||||
#define STM32_SPI2_IRQ_PRIORITY 10
|
|
||||||
#define STM32_SPI1_DMA_ERROR_HOOK() chSysHalt()
|
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
# List of all the board related files.
|
|
||||||
BOARDSRC = ../boards/OLIMEX_STM32_H103/board.c \
|
|
||||||
../boards/common/hw_config.c
|
|
||||||
|
|
||||||
# Required include directories
|
|
||||||
BOARDINC = ../boards/OLIMEX_STM32_H103
|
|
||||||
@@ -1,43 +1,3 @@
|
|||||||
/*
|
|
||||||
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
|
|
||||||
|
|
||||||
This file is part of ChibiOS/RT.
|
|
||||||
|
|
||||||
ChibiOS/RT is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
ChibiOS/RT is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
A special exception to the GPL can be applied should you wish to distribute
|
|
||||||
a combined work that includes ChibiOS/RT, without being obliged to provide
|
|
||||||
the source code for any proprietary components. See the file exception.txt
|
|
||||||
for full details of how and when the exception can be applied.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* STM32 drivers configuration.
|
|
||||||
* The following settings override the default settings present in
|
|
||||||
* the various device driver implementation headers.
|
|
||||||
* Note that the settings for each driver only have effect if the driver
|
|
||||||
* is enabled in halconf.h.
|
|
||||||
*
|
|
||||||
* IRQ priorities:
|
|
||||||
* 15...0 Lowest...Highest.
|
|
||||||
*
|
|
||||||
* DMA priorities:
|
|
||||||
* 0...3 Lowest...Highest.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* HAL driver system settings.
|
* HAL driver system settings.
|
||||||
*/
|
*/
|
||||||
@@ -51,57 +11,4 @@
|
|||||||
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||||
#define STM32_MCO STM32_MCO_NOCLOCK
|
#define STM32_MCO STM32_MCO_NOCLOCK
|
||||||
|
|
||||||
/*
|
#include "mcuconf-common.h"
|
||||||
* ADC driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_ADC1 TRUE
|
|
||||||
#define STM32_ADC1_DMA_PRIORITY 3
|
|
||||||
#define STM32_ADC1_IRQ_PRIORITY 5
|
|
||||||
#define STM32_ADC1_DMA_ERROR_HOOK() chSysHalt()
|
|
||||||
|
|
||||||
/*
|
|
||||||
* CAN driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_CAN1 TRUE
|
|
||||||
#define STM32_CAN1_IRQ_PRIORITY 11
|
|
||||||
|
|
||||||
/*
|
|
||||||
* PWM driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_PWM1 TRUE
|
|
||||||
#define USE_STM32_PWM2 FALSE
|
|
||||||
#define USE_STM32_PWM3 FALSE
|
|
||||||
#define USE_STM32_PWM4 FALSE
|
|
||||||
#define STM32_PWM1_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM2_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM3_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM4_IRQ_PRIORITY 7
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SERIAL driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_USART1 FALSE
|
|
||||||
#define USE_STM32_USART2 TRUE
|
|
||||||
#define USE_STM32_USART3 FALSE
|
|
||||||
#if defined(STM32F10X_HD) || defined(STM32F10X_CL)
|
|
||||||
#define USE_STM32_UART4 FALSE
|
|
||||||
#define USE_STM32_UART5 FALSE
|
|
||||||
#endif
|
|
||||||
#define STM32_USART1_PRIORITY 12
|
|
||||||
#define STM32_USART2_PRIORITY 12
|
|
||||||
#define STM32_USART3_PRIORITY 12
|
|
||||||
#if defined(STM32F10X_HD) || defined(STM32F10X_CL)
|
|
||||||
#define STM32_UART4_PRIORITY 12
|
|
||||||
#define STM32_UART5_PRIORITY 12
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SPI driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_SPI1 TRUE
|
|
||||||
#define USE_STM32_SPI2 TRUE
|
|
||||||
#define STM32_SPI1_DMA_PRIORITY 2
|
|
||||||
#define STM32_SPI2_DMA_PRIORITY 2
|
|
||||||
#define STM32_SPI1_IRQ_PRIORITY 10
|
|
||||||
#define STM32_SPI2_IRQ_PRIORITY 10
|
|
||||||
#define STM32_SPI1_DMA_ERROR_HOOK() chSysHalt()
|
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
# List of all the board related files.
|
|
||||||
BOARDSRC = ../boards/STBEE/board.c \
|
|
||||||
../boards/common/hw_config.c
|
|
||||||
|
|
||||||
# Required include directories
|
|
||||||
BOARDINC = ../boards/STBEE
|
|
||||||
@@ -1,43 +1,3 @@
|
|||||||
/*
|
|
||||||
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
|
|
||||||
|
|
||||||
This file is part of ChibiOS/RT.
|
|
||||||
|
|
||||||
ChibiOS/RT is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
ChibiOS/RT is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
A special exception to the GPL can be applied should you wish to distribute
|
|
||||||
a combined work that includes ChibiOS/RT, without being obliged to provide
|
|
||||||
the source code for any proprietary components. See the file exception.txt
|
|
||||||
for full details of how and when the exception can be applied.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* STM32 drivers configuration.
|
|
||||||
* The following settings override the default settings present in
|
|
||||||
* the various device driver implementation headers.
|
|
||||||
* Note that the settings for each driver only have effect if the driver
|
|
||||||
* is enabled in halconf.h.
|
|
||||||
*
|
|
||||||
* IRQ priorities:
|
|
||||||
* 15...0 Lowest...Highest.
|
|
||||||
*
|
|
||||||
* DMA priorities:
|
|
||||||
* 0...3 Lowest...Highest.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* HAL driver system settings.
|
* HAL driver system settings.
|
||||||
*/
|
*/
|
||||||
@@ -51,57 +11,4 @@
|
|||||||
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||||
#define STM32_MCO STM32_MCO_NOCLOCK
|
#define STM32_MCO STM32_MCO_NOCLOCK
|
||||||
|
|
||||||
/*
|
#include "mcuconf-common.h"
|
||||||
* ADC driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_ADC1 FALSE
|
|
||||||
#define STM32_ADC1_DMA_PRIORITY 3
|
|
||||||
#define STM32_ADC1_IRQ_PRIORITY 5
|
|
||||||
#define STM32_ADC1_DMA_ERROR_HOOK() chSysHalt()
|
|
||||||
|
|
||||||
/*
|
|
||||||
* CAN driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_CAN1 FALSE
|
|
||||||
#define STM32_CAN1_IRQ_PRIORITY 11
|
|
||||||
|
|
||||||
/*
|
|
||||||
* PWM driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_PWM1 FALSE
|
|
||||||
#define USE_STM32_PWM2 FALSE
|
|
||||||
#define USE_STM32_PWM3 FALSE
|
|
||||||
#define USE_STM32_PWM4 FALSE
|
|
||||||
#define STM32_PWM1_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM2_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM3_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM4_IRQ_PRIORITY 7
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SERIAL driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_USART1 FALSE
|
|
||||||
#define USE_STM32_USART2 FALSE
|
|
||||||
#define USE_STM32_USART3 FALSE
|
|
||||||
#if defined(STM32F10X_HD) || defined(STM32F10X_CL)
|
|
||||||
#define USE_STM32_UART4 FALSE
|
|
||||||
#define USE_STM32_UART5 FALSE
|
|
||||||
#endif
|
|
||||||
#define STM32_USART1_PRIORITY 12
|
|
||||||
#define STM32_USART2_PRIORITY 12
|
|
||||||
#define STM32_USART3_PRIORITY 12
|
|
||||||
#if defined(STM32F10X_HD) || defined(STM32F10X_CL)
|
|
||||||
#define STM32_UART4_PRIORITY 12
|
|
||||||
#define STM32_UART5_PRIORITY 12
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SPI driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_SPI1 FALSE
|
|
||||||
#define USE_STM32_SPI2 FALSE
|
|
||||||
#define STM32_SPI1_DMA_PRIORITY 2
|
|
||||||
#define STM32_SPI2_DMA_PRIORITY 2
|
|
||||||
#define STM32_SPI1_IRQ_PRIORITY 10
|
|
||||||
#define STM32_SPI2_IRQ_PRIORITY 10
|
|
||||||
#define STM32_SPI1_DMA_ERROR_HOOK() chSysHalt()
|
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
# List of all the board related files.
|
|
||||||
BOARDSRC = ../boards/STBEE_MINI/board.c \
|
|
||||||
../boards/common/hw_config.c
|
|
||||||
|
|
||||||
# Required include directories
|
|
||||||
BOARDINC = ../boards/STBEE_MINI
|
|
||||||
@@ -1,43 +1,3 @@
|
|||||||
/*
|
|
||||||
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
|
|
||||||
|
|
||||||
This file is part of ChibiOS/RT.
|
|
||||||
|
|
||||||
ChibiOS/RT is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
ChibiOS/RT is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
A special exception to the GPL can be applied should you wish to distribute
|
|
||||||
a combined work that includes ChibiOS/RT, without being obliged to provide
|
|
||||||
the source code for any proprietary components. See the file exception.txt
|
|
||||||
for full details of how and when the exception can be applied.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* STM32 drivers configuration.
|
|
||||||
* The following settings override the default settings present in
|
|
||||||
* the various device driver implementation headers.
|
|
||||||
* Note that the settings for each driver only have effect if the driver
|
|
||||||
* is enabled in halconf.h.
|
|
||||||
*
|
|
||||||
* IRQ priorities:
|
|
||||||
* 15...0 Lowest...Highest.
|
|
||||||
*
|
|
||||||
* DMA priorities:
|
|
||||||
* 0...3 Lowest...Highest.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* HAL driver system settings.
|
* HAL driver system settings.
|
||||||
*/
|
*/
|
||||||
@@ -50,58 +10,3 @@
|
|||||||
#define STM32_PPRE2 STM32_PPRE2_DIV2
|
#define STM32_PPRE2 STM32_PPRE2_DIV2
|
||||||
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||||
#define STM32_MCO STM32_MCO_NOCLOCK
|
#define STM32_MCO STM32_MCO_NOCLOCK
|
||||||
|
|
||||||
/*
|
|
||||||
* ADC driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_ADC1 FALSE
|
|
||||||
#define STM32_ADC1_DMA_PRIORITY 3
|
|
||||||
#define STM32_ADC1_IRQ_PRIORITY 5
|
|
||||||
#define STM32_ADC1_DMA_ERROR_HOOK() chSysHalt()
|
|
||||||
|
|
||||||
/*
|
|
||||||
* CAN driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_CAN1 FALSE
|
|
||||||
#define STM32_CAN1_IRQ_PRIORITY 11
|
|
||||||
|
|
||||||
/*
|
|
||||||
* PWM driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_PWM1 FALSE
|
|
||||||
#define USE_STM32_PWM2 FALSE
|
|
||||||
#define USE_STM32_PWM3 FALSE
|
|
||||||
#define USE_STM32_PWM4 FALSE
|
|
||||||
#define STM32_PWM1_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM2_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM3_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM4_IRQ_PRIORITY 7
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SERIAL driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_USART1 FALSE
|
|
||||||
#define USE_STM32_USART2 FALSE
|
|
||||||
#define USE_STM32_USART3 FALSE
|
|
||||||
#if defined(STM32F10X_HD) || defined(STM32F10X_CL)
|
|
||||||
#define USE_STM32_UART4 FALSE
|
|
||||||
#define USE_STM32_UART5 FALSE
|
|
||||||
#endif
|
|
||||||
#define STM32_USART1_PRIORITY 12
|
|
||||||
#define STM32_USART2_PRIORITY 12
|
|
||||||
#define STM32_USART3_PRIORITY 12
|
|
||||||
#if defined(STM32F10X_HD) || defined(STM32F10X_CL)
|
|
||||||
#define STM32_UART4_PRIORITY 12
|
|
||||||
#define STM32_UART5_PRIORITY 12
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SPI driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_SPI1 FALSE
|
|
||||||
#define USE_STM32_SPI2 FALSE
|
|
||||||
#define STM32_SPI1_DMA_PRIORITY 2
|
|
||||||
#define STM32_SPI2_DMA_PRIORITY 2
|
|
||||||
#define STM32_SPI1_IRQ_PRIORITY 10
|
|
||||||
#define STM32_SPI2_IRQ_PRIORITY 10
|
|
||||||
#define STM32_SPI1_DMA_ERROR_HOOK() chSysHalt()
|
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
# List of all the board related files.
|
|
||||||
BOARDSRC = ../boards/STM32_PRIMER2/board.c \
|
|
||||||
../boards/common/hw_config.c
|
|
||||||
|
|
||||||
# Required include directories
|
|
||||||
BOARDINC = ../boards/STM32_PRIMER2
|
|
||||||
@@ -1,43 +1,3 @@
|
|||||||
/*
|
|
||||||
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
|
|
||||||
|
|
||||||
This file is part of ChibiOS/RT.
|
|
||||||
|
|
||||||
ChibiOS/RT is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
ChibiOS/RT is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
A special exception to the GPL can be applied should you wish to distribute
|
|
||||||
a combined work that includes ChibiOS/RT, without being obliged to provide
|
|
||||||
the source code for any proprietary components. See the file exception.txt
|
|
||||||
for full details of how and when the exception can be applied.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* STM32 drivers configuration.
|
|
||||||
* The following settings override the default settings present in
|
|
||||||
* the various device driver implementation headers.
|
|
||||||
* Note that the settings for each driver only have effect if the driver
|
|
||||||
* is enabled in halconf.h.
|
|
||||||
*
|
|
||||||
* IRQ priorities:
|
|
||||||
* 15...0 Lowest...Highest.
|
|
||||||
*
|
|
||||||
* DMA priorities:
|
|
||||||
* 0...3 Lowest...Highest.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* HAL driver system settings.
|
* HAL driver system settings.
|
||||||
*/
|
*/
|
||||||
@@ -51,57 +11,4 @@
|
|||||||
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||||
#define STM32_MCO STM32_MCO_NOCLOCK
|
#define STM32_MCO STM32_MCO_NOCLOCK
|
||||||
|
|
||||||
/*
|
#include "mcuconf-common.h"
|
||||||
* ADC driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_ADC1 TRUE
|
|
||||||
#define STM32_ADC1_DMA_PRIORITY 3
|
|
||||||
#define STM32_ADC1_IRQ_PRIORITY 5
|
|
||||||
#define STM32_ADC1_DMA_ERROR_HOOK() chSysHalt()
|
|
||||||
|
|
||||||
/*
|
|
||||||
* CAN driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_CAN1 TRUE
|
|
||||||
#define STM32_CAN1_IRQ_PRIORITY 11
|
|
||||||
|
|
||||||
/*
|
|
||||||
* PWM driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_PWM1 TRUE
|
|
||||||
#define USE_STM32_PWM2 FALSE
|
|
||||||
#define USE_STM32_PWM3 FALSE
|
|
||||||
#define USE_STM32_PWM4 FALSE
|
|
||||||
#define STM32_PWM1_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM2_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM3_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM4_IRQ_PRIORITY 7
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SERIAL driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_USART1 FALSE
|
|
||||||
#define USE_STM32_USART2 FALSE
|
|
||||||
#define USE_STM32_USART3 FALSE
|
|
||||||
#if defined(STM32F10X_HD) || defined(STM32F10X_CL)
|
|
||||||
#define USE_STM32_UART4 FALSE
|
|
||||||
#define USE_STM32_UART5 FALSE
|
|
||||||
#endif
|
|
||||||
#define STM32_USART1_PRIORITY 12
|
|
||||||
#define STM32_USART2_PRIORITY 12
|
|
||||||
#define STM32_USART3_PRIORITY 12
|
|
||||||
#if defined(STM32F10X_HD) || defined(STM32F10X_CL)
|
|
||||||
#define STM32_UART4_PRIORITY 12
|
|
||||||
#define STM32_UART5_PRIORITY 12
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SPI driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_SPI1 TRUE
|
|
||||||
#define USE_STM32_SPI2 TRUE
|
|
||||||
#define STM32_SPI1_DMA_PRIORITY 2
|
|
||||||
#define STM32_SPI2_DMA_PRIORITY 2
|
|
||||||
#define STM32_SPI1_IRQ_PRIORITY 10
|
|
||||||
#define STM32_SPI2_IRQ_PRIORITY 10
|
|
||||||
#define STM32_SPI1_DMA_ERROR_HOOK() chSysHalt()
|
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
# List of all the board related files.
|
|
||||||
BOARDSRC = ../boards/STM8S_DISCOVERY/board.c \
|
|
||||||
../boards/common/hw_config.c
|
|
||||||
|
|
||||||
# Required include directories
|
|
||||||
BOARDINC = ../boards/STM8S_DISCOVERY
|
|
||||||
@@ -1,43 +1,3 @@
|
|||||||
/*
|
|
||||||
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
|
|
||||||
|
|
||||||
This file is part of ChibiOS/RT.
|
|
||||||
|
|
||||||
ChibiOS/RT is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
ChibiOS/RT is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
A special exception to the GPL can be applied should you wish to distribute
|
|
||||||
a combined work that includes ChibiOS/RT, without being obliged to provide
|
|
||||||
the source code for any proprietary components. See the file exception.txt
|
|
||||||
for full details of how and when the exception can be applied.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* STM32 drivers configuration.
|
|
||||||
* The following settings override the default settings present in
|
|
||||||
* the various device driver implementation headers.
|
|
||||||
* Note that the settings for each driver only have effect if the driver
|
|
||||||
* is enabled in halconf.h.
|
|
||||||
*
|
|
||||||
* IRQ priorities:
|
|
||||||
* 15...0 Lowest...Highest.
|
|
||||||
*
|
|
||||||
* DMA priorities:
|
|
||||||
* 0...3 Lowest...Highest.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* HAL driver system settings.
|
* HAL driver system settings.
|
||||||
*/
|
*/
|
||||||
@@ -51,57 +11,4 @@
|
|||||||
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
#define STM32_ADCPRE STM32_ADCPRE_DIV4
|
||||||
#define STM32_MCO STM32_MCO_NOCLOCK
|
#define STM32_MCO STM32_MCO_NOCLOCK
|
||||||
|
|
||||||
/*
|
#include "mcuconf-common.h"
|
||||||
* ADC driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_ADC1 FALSE
|
|
||||||
#define STM32_ADC1_DMA_PRIORITY 3
|
|
||||||
#define STM32_ADC1_IRQ_PRIORITY 5
|
|
||||||
#define STM32_ADC1_DMA_ERROR_HOOK() chSysHalt()
|
|
||||||
|
|
||||||
/*
|
|
||||||
* CAN driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_CAN1 FALSE
|
|
||||||
#define STM32_CAN1_IRQ_PRIORITY 11
|
|
||||||
|
|
||||||
/*
|
|
||||||
* PWM driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_PWM1 FALSE
|
|
||||||
#define USE_STM32_PWM2 FALSE
|
|
||||||
#define USE_STM32_PWM3 FALSE
|
|
||||||
#define USE_STM32_PWM4 FALSE
|
|
||||||
#define STM32_PWM1_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM2_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM3_IRQ_PRIORITY 7
|
|
||||||
#define STM32_PWM4_IRQ_PRIORITY 7
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SERIAL driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_USART1 FALSE
|
|
||||||
#define USE_STM32_USART2 FALSE
|
|
||||||
#define USE_STM32_USART3 FALSE
|
|
||||||
#if defined(STM32F10X_HD) || defined(STM32F10X_CL)
|
|
||||||
#define USE_STM32_UART4 FALSE
|
|
||||||
#define USE_STM32_UART5 FALSE
|
|
||||||
#endif
|
|
||||||
#define STM32_USART1_PRIORITY 12
|
|
||||||
#define STM32_USART2_PRIORITY 12
|
|
||||||
#define STM32_USART3_PRIORITY 12
|
|
||||||
#if defined(STM32F10X_HD) || defined(STM32F10X_CL)
|
|
||||||
#define STM32_UART4_PRIORITY 12
|
|
||||||
#define STM32_UART5_PRIORITY 12
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SPI driver system settings.
|
|
||||||
*/
|
|
||||||
#define USE_STM32_SPI1 FALSE
|
|
||||||
#define USE_STM32_SPI2 FALSE
|
|
||||||
#define STM32_SPI1_DMA_PRIORITY 2
|
|
||||||
#define STM32_SPI2_DMA_PRIORITY 2
|
|
||||||
#define STM32_SPI1_IRQ_PRIORITY 10
|
|
||||||
#define STM32_SPI2_IRQ_PRIORITY 10
|
|
||||||
#define STM32_SPI1_DMA_ERROR_HOOK() chSysHalt()
|
|
||||||
|
|||||||
94
boards/common/mcuconf-common.h
Normal file
94
boards/common/mcuconf-common.h
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
|
||||||
|
|
||||||
|
This file is part of ChibiOS/RT.
|
||||||
|
|
||||||
|
ChibiOS/RT is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
ChibiOS/RT is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
A special exception to the GPL can be applied should you wish to distribute
|
||||||
|
a combined work that includes ChibiOS/RT, without being obliged to provide
|
||||||
|
the source code for any proprietary components. See the file exception.txt
|
||||||
|
for full details of how and when the exception can be applied.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* STM32 drivers configuration.
|
||||||
|
* The following settings override the default settings present in
|
||||||
|
* the various device driver implementation headers.
|
||||||
|
* Note that the settings for each driver only have effect if the driver
|
||||||
|
* is enabled in halconf.h.
|
||||||
|
*
|
||||||
|
* IRQ priorities:
|
||||||
|
* 15...0 Lowest...Highest.
|
||||||
|
*
|
||||||
|
* DMA priorities:
|
||||||
|
* 0...3 Lowest...Highest.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ADC driver system settings.
|
||||||
|
*/
|
||||||
|
#define USE_STM32_ADC1 FALSE
|
||||||
|
#define STM32_ADC1_DMA_PRIORITY 3
|
||||||
|
#define STM32_ADC1_IRQ_PRIORITY 5
|
||||||
|
#define STM32_ADC1_DMA_ERROR_HOOK() chSysHalt()
|
||||||
|
|
||||||
|
/*
|
||||||
|
* CAN driver system settings.
|
||||||
|
*/
|
||||||
|
#define USE_STM32_CAN1 FALSE
|
||||||
|
#define STM32_CAN1_IRQ_PRIORITY 11
|
||||||
|
|
||||||
|
/*
|
||||||
|
* PWM driver system settings.
|
||||||
|
*/
|
||||||
|
#define USE_STM32_PWM1 FALSE
|
||||||
|
#define USE_STM32_PWM2 FALSE
|
||||||
|
#define USE_STM32_PWM3 FALSE
|
||||||
|
#define USE_STM32_PWM4 FALSE
|
||||||
|
#define STM32_PWM1_IRQ_PRIORITY 7
|
||||||
|
#define STM32_PWM2_IRQ_PRIORITY 7
|
||||||
|
#define STM32_PWM3_IRQ_PRIORITY 7
|
||||||
|
#define STM32_PWM4_IRQ_PRIORITY 7
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SERIAL driver system settings.
|
||||||
|
*/
|
||||||
|
#define USE_STM32_USART1 FALSE
|
||||||
|
#define USE_STM32_USART2 FALSE
|
||||||
|
#define USE_STM32_USART3 FALSE
|
||||||
|
#if defined(STM32F10X_HD) || defined(STM32F10X_CL)
|
||||||
|
#define USE_STM32_UART4 FALSE
|
||||||
|
#define USE_STM32_UART5 FALSE
|
||||||
|
#endif
|
||||||
|
#define STM32_USART1_PRIORITY 12
|
||||||
|
#define STM32_USART2_PRIORITY 12
|
||||||
|
#define STM32_USART3_PRIORITY 12
|
||||||
|
#if defined(STM32F10X_HD) || defined(STM32F10X_CL)
|
||||||
|
#define STM32_UART4_PRIORITY 12
|
||||||
|
#define STM32_UART5_PRIORITY 12
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPI driver system settings.
|
||||||
|
*/
|
||||||
|
#define USE_STM32_SPI1 FALSE
|
||||||
|
#define USE_STM32_SPI2 FALSE
|
||||||
|
#define STM32_SPI1_DMA_PRIORITY 2
|
||||||
|
#define STM32_SPI2_DMA_PRIORITY 2
|
||||||
|
#define STM32_SPI1_IRQ_PRIORITY 10
|
||||||
|
#define STM32_SPI2_IRQ_PRIORITY 10
|
||||||
|
#define STM32_SPI1_DMA_ERROR_HOOK() chSysHalt()
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
# Makefile for Gnuk
|
# Makefile for Gnuk
|
||||||
|
|
||||||
|
BOARD_DIR=@BOARD_DIR@
|
||||||
@PINPAD_MAKE_OPTION@
|
@PINPAD_MAKE_OPTION@
|
||||||
@DEBUG_MAKE_OPTION@
|
@DEBUG_MAKE_OPTION@
|
||||||
ifneq ($(ENABLE_DEBUG),)
|
ifneq ($(ENABLE_DEBUG),)
|
||||||
@@ -72,7 +73,6 @@ include $(CHIBIOS)/os/kernel/kernel.mk
|
|||||||
include stmusb.mk
|
include stmusb.mk
|
||||||
include vcomport.mk
|
include vcomport.mk
|
||||||
include crypt.mk
|
include crypt.mk
|
||||||
include @BOARD_MAKEFILE@
|
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
@@ -81,6 +81,8 @@ CSRC = $(PORTSRC) \
|
|||||||
$(HALSRC) \
|
$(HALSRC) \
|
||||||
$(PLATFORMSRC) \
|
$(PLATFORMSRC) \
|
||||||
$(BOARDSRC) \
|
$(BOARDSRC) \
|
||||||
|
../boards/common/hw_config.c \
|
||||||
|
$(BOARD_DIR)/board.c \
|
||||||
$(CHIBIOS)/os/various/evtimer.c \
|
$(CHIBIOS)/os/various/evtimer.c \
|
||||||
$(CHIBIOS)/os/various/syscalls.c \
|
$(CHIBIOS)/os/various/syscalls.c \
|
||||||
$(STMUSBSRC) \
|
$(STMUSBSRC) \
|
||||||
@@ -105,7 +107,7 @@ ASMSRC = $(PORTASM) \
|
|||||||
|
|
||||||
INCDIR = $(CRYPTINCDIR) $(STMUSBINCDIR) $(VCOMDIR) \
|
INCDIR = $(CRYPTINCDIR) $(STMUSBINCDIR) $(VCOMDIR) \
|
||||||
$(PORTINC) $(KERNINC) $(TESTINC) \
|
$(PORTINC) $(KERNINC) $(TESTINC) \
|
||||||
$(HALINC) $(PLATFORMINC) $(BOARDINC) \
|
$(HALINC) $(PLATFORMINC) ../boards/common $(BOARD_DIR) \
|
||||||
$(CHIBIOS)/os/various
|
$(CHIBIOS)/os/various
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -204,10 +206,8 @@ endif
|
|||||||
|
|
||||||
include $(CHIBIOS)/os/ports/GCC/ARM/rules.mk
|
include $(CHIBIOS)/os/ports/GCC/ARM/rules.mk
|
||||||
|
|
||||||
OUTFILES += random_bits
|
|
||||||
|
|
||||||
random_bits:
|
random_bits:
|
||||||
dd if=/dev/random bs=1 of=random_bits count=1024
|
dd if=/dev/random bs=1 of=random_bits count=1024
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
-rm -f Makefile gnuk.ld config.h
|
-rm -f Makefile gnuk.ld config.h random_bits
|
||||||
|
|||||||
6
src/configure
vendored
6
src/configure
vendored
@@ -93,8 +93,8 @@ EOF
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BOARD_MAKEFILE=../boards/$target/board.mk
|
BOARD_DIR=../boards/$target
|
||||||
if test -f $BOARD_MAKEFILE; then
|
if test -d $BOARD_DIR; then
|
||||||
echo "Configured for target: $target"
|
echo "Configured for target: $target"
|
||||||
else
|
else
|
||||||
echo "Unsupported target \`$target'" >&2
|
echo "Unsupported target \`$target'" >&2
|
||||||
@@ -170,7 +170,7 @@ else
|
|||||||
echo "PIN pad option enabled ($pinpad)"
|
echo "PIN pad option enabled ($pinpad)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed -e "s%@BOARD_MAKEFILE@%$BOARD_MAKEFILE%" \
|
sed -e "s%@BOARD_DIR@%$BOARD_DIR%" \
|
||||||
-e "s%@DEBUG_MAKE_OPTION@%$DEBUG_MAKE_OPTION%" \
|
-e "s%@DEBUG_MAKE_OPTION@%$DEBUG_MAKE_OPTION%" \
|
||||||
-e "s%@PINPAD_MAKE_OPTION@%$PINPAD_MAKE_OPTION%" \
|
-e "s%@PINPAD_MAKE_OPTION@%$PINPAD_MAKE_OPTION%" \
|
||||||
< Makefile.in > Makefile
|
< Makefile.in > Makefile
|
||||||
|
|||||||
Reference in New Issue
Block a user