Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
bb293e6b
Commit
bb293e6b
authored
9 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
stmhal: Add stmhal-specific README.md with extra details for this port.
parent
2c72ae5c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+1
-0
1 addition, 0 deletions
README.md
stmhal/README.md
+66
-0
66 additions, 0 deletions
stmhal/README.md
with
67 additions
and
0 deletions
README.md
+
1
−
0
View file @
bb293e6b
...
...
@@ -149,3 +149,4 @@ Then to flash the code via USB DFU to your device:
This will use the included
`tools/pydfu.py`
script. If flashing the firmware
does not work it may be because you don't have the correct permissions, and
need to use
`sudo make deploy`
.
See the README.md file in the stmhal/ directory for further details.
This diff is collapsed.
Click to expand it.
stmhal/README.md
0 → 100644
+
66
−
0
View file @
bb293e6b
MicroPython port to STM32 MCUs
==============================
This directory contains the port of MicroPython to ST's line of STM32Fxxx
microcontrollers. It is based on the STM32Cube HAL library and currently
supports: STM32F401, STM32F405, STM32F411, STM32F429, STM32F746.
The officially supported boards are the line of pyboards: PYBv1.0 and PYBv1.1
(both with STM32F405), and PYBLITEv1.0 (with STM32F411). See
[
micropython.org/pyboard
](
http://www.micropython.org/pyboard/
)
for further
details.
Other boards that are supported include ST Discovery and Nucleo boards.
See the boards/ subdirectory, which contains the configuration files used
to build each individual board.
Build instructions
------------------
An ARM compiler is required for the build, along with the associated binary
utilities. The default compiler is
`arm-none-eabi-gcc`
, which is available for
Arch Linux via the package
`arm-none-eabi-gcc`
, for Ubuntu via instructions
[
here
](
https://launchpad.net/~team-gcc-arm-embedded/+archive/ubuntu/ppa
)
, or
see
[
here
](
https://launchpad.net/gcc-arm-embedded
)
for the main GCC ARM
Embedded page. The compiler can be changed using the
`CROSS_COMPILE`
variable
when invoking
`make`
.
To build for a given board, run:
$ make BOARD=PYBV11
The default board is PYBV10 but any of the names of the subdirectories in the
`boards/`
directory can be passed as the argument to
`BOARD=`
. The above command
should produce binary images in the
`build-PYBV11/`
subdirectory (or the
equivalent directory for the board specified).
You must then get your board/microcontroller into DFU mode. On the pyboard
connect the 3V3 pin to the P1/DFU pin with a wire (they are next to each
other on the bottom left of the board, second row from the bottom) and then
reset (by pressing the RST button) or power on the board. Then flash the
firmware using the command:
$ make BOARD=PYBV11 deploy
This will use the included
`tools/pydfu.py`
script. You can use instead the
`dfu-util`
program (available
[
here
](
http://dfu-util.sourceforge.net/
)
) by
passing
`USE_PYDFU=0`
:
$ make BOARD=PYBV11 USE_PYDFU=0 deploy
If flashing the firmware does not work it may be because you don't have the
correct permissions. Try then:
$ sudo make BOARD=PYBV11 deploy
Or using
`dfu-util`
directly:
$ sudo dfu-util -a 0 -d 0483:df11 -D build-PYBV11/firmware.dfu
Accessing the board
-------------------
Once built and deployed, access the MicroPython REPL (the Python prompt) via USB
serial or UART, depending on the board. For the pyboard you can try:
$ picocom /dev/ttyACM0
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment