Comments (10)
If you compiling with TARGET=BLUE_PILL
, then try to change these two lines: https://github.com/gl-sergei/chopstx/blob/984116b3b64b93f5a9e315f8a805db74f22fb90b/board/board-blue-pill.h#L12
Ideally, you should prepare header file for your board and add makefile target.
BTW, which board are you trying to run it on?
from u2f-token.
I happened to have this board. Just tested it, it works with these changes:
diff --git i/board/board-blue-pill.h w/board/board-blue-pill.h
index 68843d7..8fe4fe9 100644
--- i/board/board-blue-pill.h
+++ w/board/board-blue-pill.h
@@ -9,8 +9,8 @@
#define STM32_PLLMUL_VALUE 9
#define STM32_HSECLK 8000000
-#define GPIO_LED_BASE GPIOC_BASE
-#define GPIO_LED_CLEAR_TO_EMIT 13
+#define GPIO_LED_BASE GPIOB_BASE
+#define GPIO_LED_CLEAR_TO_EMIT 12
#define GPIO_USB_BASE GPIOA_BASE
#define GPIO_USB_SET_TO_ENABLE 12
#undef GPIO_OTHER_BASE
@@ -29,8 +29,8 @@
#define VAL_GPIO_USB_CRH 0x88811888 /* PA15...PA8 */
#define VAL_GPIO_LED_ODR 0xFFFFFFFF
-#define VAL_GPIO_LED_CRL 0x88888888 /* PC7...PC0 */
-#define VAL_GPIO_LED_CRH 0x88388888 /* PC15...PC8 */
+#define VAL_GPIO_LED_CRL 0x88888888 /* PB7...PB0 */
+#define VAL_GPIO_LED_CRH 0x88838888 /* PB15...PB8 */
-#define RCC_ENR_IOP_EN (RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPCEN)
+#define RCC_ENR_IOP_EN (RCC_APB2ENR_IOPBEN | RCC_APB2ENR_IOPCEN)
#define RCC_RSTR_IOP_RST (RCC_APB2RSTR_IOPARST | RCC_APB2RSTR_IOPCRST)
Make sure to run
make clean distclean && make TARGET=BLUE_PILL
after applying the patch.
Please also note that since your board does not have a push button to check for user presence, firmware will allow register/authenticate only within 10 seconds after device has been plugged in. You'll probably need to unplug the device and plug it back (or press HW reset button) to authenticate.
from u2f-token.
I work witch stm32f103c6 and led pin is PB12. I for a long time could not understand why the standard example blink does not work and having looked closely to the board I saw that the LED is connected to the foot of pb12
from u2f-token.
The LED should do some kind of work?
from u2f-token.
For PB12 it should look like
#define GPIO_LED_BASE GPIOB_BASE
#define GPIO_LED_CLEAR_TO_EMIT 12
and probably this line needs to be changed to something like
#define VAL_GPIO_LED_CRH 0x88838888 /* PB15...PB8 */
LED will blink when you plug the board and it will blink each time board communicates via USB.
from u2f-token.
i changed, but led didn't work((
maybe need change all lines?
#define VAL_GPIO_LED_ODR 0xFFFFFFFF
#define VAL_GPIO_LED_CRL 0x88888888 /* PC7...PC0 */
from u2f-token.
from u2f-token.
Nice its work! pls add it to compiler (Target=DARK_PILL)
from u2f-token.
The last question: where do I connect the button for authorization?
from u2f-token.
First, you will need to solder a push button. Then, you will need to modify pbt.c
to read events on this button's GPIO PIN and probably board-blue-pill.h
as well, to initialise that GPIO PIN.
For new makefile target I created #10
from u2f-token.
Related Issues (20)
- How to handle 'Push button' using a 'Blue Pill' board? HOT 1
- Different udev rules HOT 3
- Udev rules for certtool
- no x.509v3 U2F attestation certificate HOT 6
- Add .elf file to releases, or make inject_key work on .bin files HOT 10
- Errors while using u2f-token with tomu HOT 5
- certtool: add test command
- Alternative to NIST P-256 ? HOT 3
- Update the token with USB HOT 1
- Packaging into Debian HOT 2
- Unable to boot properly with TOMU inserted HOT 6
- Windows + Firefox support HOT 3
- The key is not initialized HOT 3
- blue pill switch? HOT 3
- FIDO2?
- Signed tags
- Unable to intialize device with injected key HOT 6
- Problems with dfu-utils flashing tomu on MacOS - dfu-util: Cannot set alternate interface
- Port for Raspberry PI Pico? HOT 2
- Issue with counters? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from u2f-token.