Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

machine/stm32f4: refactor common code and add new build tag stm32f4 #1332

Merged
merged 2 commits into from
Sep 1, 2020

Conversation

ardnew
Copy link
Contributor

@ardnew ardnew commented Aug 30, 2020

As requested to make smaller PRs, this is a subset of changes originally proposed in PR #1322.

Specifically, this change creates a new build tag stm32f4, adds that tag to the currently one board that supports it (stm32f4disco), and refactored code in stm32f4disco to a set of common source files usable by stm32f4disco and any future boards with this same chip.

@sago35
Copy link
Member

sago35 commented Aug 31, 2020

PR Thank you.
Overall it's very good.
I had no problems with flash on f4disco either.

Please change the review comment mentioned above.

$ tinygo flash --target stm32f4disco -size short ./src/examples/blinky1
   code    data     bss |   flash     ram
   3740       4    4276 |    3744    4280
Open On-Chip Debugger 0.10.0+dev-g5c9350d2 (2020-08-07-12:56)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
WARNING: interface/stlink-v2.cfg is deprecated, please switch to interface/stlink.cfg
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 2000 kHz
Info : STLINK V2J25M14 (API v2) VID:PID 0483:374B
Info : Target voltage: 2.906762
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for stm32f4x.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08000748 msp: 0x20001000
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
** Programming Started **
Info : device id = 0x10076413
Info : flash size = 1024 kbytes
** Programming Finished **
** Resetting Target **
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
shutdown command invoked

@sago35
Copy link
Member

sago35 commented Aug 31, 2020

CI should be fine the next time you push.

@deadprogram
Copy link
Member

All tests are passing, so @ardnew is you can please just make the header change requested by @sago35 this PR seems good to go.

@deadprogram deadprogram merged commit 7f829fe into tinygo-org:dev Sep 1, 2020
@deadprogram
Copy link
Member

Squashed/merged this PR, thank you very much for this contribution @ardnew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants