Dave Hylands
92fec603d0
stm32/make-stmconst.py: Improve regex to parse more constants.
...
A few RTC constants weren't being parsed properly due to whitespace
differences, and this patch makes certain whitespace optional. Changes
made:
- allow for no space between /*!< and EXTI, eg for:
__IO uint32_t IMR; /*!<EXTI Interrupt mask register, Address offset: 0x00 */
- allow for no space between semicolon and start of comment, eg for:
__IO uint32_t ALRMASSR;/*!< RTC alarm A sub second register, Address offset: 0x44 */
2019-02-19 15:17:28 +11:00
Dave Hylands
9441f4b682
stm32/extint: Fix RTC Alarm/FS USB EXTI constants for L4.
2019-02-19 15:17:28 +11:00
Dave Hylands
363900be5d
stm32/extint: Fix ExtInt to work with non-GPIO pins.
2019-02-19 15:17:20 +11:00
Damien George
303f27f656
esp32/modsocket: Change socket.socket to be socket type rather than fun.
...
To make all ports consistent. Addresses issue #4514 .
2019-02-18 23:20:13 +11:00
Damien George
c65e5c88b8
stm32/boards/stm32f429.ld: Increase uPy heap size by 64k for F429 MCU.
...
The F429 has 256k total RAM, with 64k already set aside for flash write
cache, so the uPy heap can be increased this much.
2019-02-18 13:18:59 +11:00
Damien George
ed09e13943
esp32/modsocket: Fix usocket.send to accept anything with buffer proto.
2019-02-18 12:38:38 +11:00
Damien George
c551169bd8
stm32/mboot: Add hook to run board-specific code early on startup.
2019-02-15 15:34:05 +11:00
Damien George
65b1fefa31
stm32/modmachine: Add ability to pass through user data to mboot.
2019-02-15 15:10:04 +11:00
Damien George
3669198403
stm32/mboot: Add support script which can program mboot and application.
2019-02-15 15:09:59 +11:00
Damien George
3d0c31e60e
stm32/mboot: Move some BSS vars to new section that isn't zeroed out.
...
Zeroing out data on startup takes time and is not necessary for certain
variables. So provide a declaration for such variables and use it.
2019-02-15 15:09:54 +11:00
Damien George
ff04b78ffd
stm32/mboot: Add support for loading gzip'd firmware from a filesystem.
...
This adds support to mboot to load and program application firmware from
a .dfu.gz file on the board's filesystem. See mboot/README.md for details.
2019-02-15 15:09:48 +11:00
Andrew Leech
4daee31706
stm32/qspi: Use static af functions for pin configuration.
...
This allows qspi pin configuration to work on any supported platform.
2019-02-14 13:42:08 +11:00
Damien George
be4e5b1f87
stm32/mboot/mphalport.h: Include genhdr/pins.h for access to pin names.
...
So that mboot configuration can use names like pyb_pin_X1.
2019-02-14 13:39:13 +11:00
Damien George
f38397ba8d
stm32/mboot/Makefile: Generate all pin header files from board pins.csv.
2019-02-14 13:36:32 +11:00
Damien George
7b2dc96251
stm32/boards/make-pins.py: Add cmdline options to support use by mboot.
2019-02-14 13:35:39 +11:00
Yonatan Goldschmidt
bc4f8b438b
extmod/moduwebsocket: Refactor `websocket` to `uwebsocket`.
...
As mentioned in #4450 , `websocket` was experimental with a single intended
user, `webrepl`. Therefore, we'll make this change without a weak
link `websocket` -> `uwebsocket`.
2019-02-14 00:35:45 +11:00
Jolatomme
d1acca3c71
stm32/boards/NUCLEO_L476RG: Add support for RNG, DAC and CAN1.
...
PLLQ is changed to get CAN working, and I2C1 pins are changed to those
prescribed by the board.
2019-02-14 00:28:28 +11:00
Damien George
26a1ae295f
stm32/mboot/Makefile: Support specifying BOARD_DIR for custom board.
2019-02-14 00:01:14 +11:00
Yonatan Goldschmidt
66f0afc91d
unix/modmachine: Handle repeated /dev/mem open errors.
...
If opening of /dev/mem has failed an `OSError` is appropriately raised, but
the next time `mem8/16/32` is accessed the invalid file descriptor is used
and the program gets a SIGSEGV.
2019-02-12 15:29:11 +11:00
Mike Causer
812969d615
all: Change PYB message prefix to MPY.
...
Replaces "PYB: soft reboot" with "MPY: soft reboot", etc.
Having a consistent prefix across ports reduces the difference between
ports, which is a general goal. And this change won't break pyboard.py
because that tool only looks for "soft reboot".
2019-02-12 15:18:33 +11:00
Damien George
d976e4f5e8
teensy/Makefile: Use common gchelper_m3.s code from lib/utils.
2019-02-12 15:12:24 +11:00
Damien George
6e30f96b0b
ports: Convert legacy uppercase macro names to lowercase.
2019-02-12 14:54:51 +11:00
Damien George
019433a17e
stm32/pendsv: Fix inline asm constant and prefix with # character.
2019-02-12 14:50:27 +11:00
Damien George
d53dc04903
qemu-arm: Use gchelper code to get registers for GC scanning.
2019-02-12 14:48:29 +11:00
Damien George
c9ece68d06
cc3200: Use common gchelper_m3.s code from lib/utils.
2019-02-12 14:41:48 +11:00
Damien George
3058d46892
stm32/gccollect: Use gchelper.h header instead of explicit declaration.
2019-02-12 14:38:30 +11:00
Damien George
e6d97e8a0b
stm32: Move gchelper assembler code to lib/utils for use by other ports.
2019-02-12 14:11:21 +11:00
Damien George
e7332b0584
qemu-arm: Rework to run bare-metal on boards with Cortex-M CPUs.
...
Adds support for 3 Cortex-M boards, selectable via "BOARD" in the Makefile:
- microbit, Cortex-M0 via nRF51822
- netduino2, Cortex-M3 via STM32F205
- mps2-an385, Cortex-M3 via FPGA
netduino2 is the default board because it's supported by older qemu
versions (down to at least 2.5.0).
2019-02-12 13:50:01 +11:00
Damien George
b546e4b7e9
stm32/pendsv: Fix NULL pointer when calling pendsv dispatch function.
2019-02-08 16:38:09 +11:00
Damien George
800871c0cb
stm32/modnetwork: Change lwIP polling to be based on background systick.
2019-02-08 16:38:09 +11:00
Damien George
4d214edae8
stm32/systick: Provide better compile-time configurability of slots.
2019-02-08 15:31:02 +11:00
Damien George
18cfa156d6
stm32/pendsv: Add ability to schedule callbacks at pendsv IRQ level.
2019-02-08 01:20:13 +11:00
Damien George
b178958c07
stm32/pendsv: Clean up pendsv IRQ handler and eliminate duplicate code.
2019-02-08 01:20:13 +11:00
Damien George
1bcf4afb10
stm32/systick: Make periodic systick callbacks use a cyclic func table.
...
Instead of checking each callback (currently storage and dma) explicitly
for each SysTick IRQ, use a simple circular function table indexed by the
lower bits of the millisecond tick counter. This allows callbacks to be
easily enabled/disabled at runtime, and scales well to a large number of
callbacks.
2019-02-08 01:20:13 +11:00
Damien George
5fbda53d3c
stm32/systick: Rename sys_tick_XXX functions to systick_XXX.
2019-02-08 01:20:09 +11:00
Damien George
c33f538066
esp32/modmachine: Add support for changing the CPU frequency.
2019-02-07 22:51:55 +11:00
Damien George
1669e049de
stm32/boards/STM32F769DISC: Configure for use with mboot by default.
...
This is a good board to demonstrate the use of Mboot because it only has a
USB HS port exposed so the native ST DFU mode cannot be used. With Mboot
this port can be used.
2019-02-07 16:28:01 +11:00
Damien George
be1b1835c3
stm32/boards/STM32F769DISC: Support the use of USB HS with external PHY.
2019-02-07 16:26:46 +11:00
Damien George
b26046aca2
stm32/modmachine: Make bootloader() enter custom loader if it's enabled.
...
If a custom bootloader is enabled (eg mboot) then machine.bootloader() will
now enter that loader. To get the original ST DFU loader pass any argument
to the function, like machine.bootloader(1).
2019-02-07 16:13:57 +11:00
Damien George
ab423f2969
stm32/usbd_conf: Fully support USB HS with external PHY.
2019-02-07 16:09:25 +11:00
Damien George
9f9c5c19b0
stm32/usb: Use USB HS as main USB device regardless of USB_HS_IN_FS.
2019-02-07 16:09:08 +11:00
Damien George
03a8b1cc50
stm32/mboot: Allow deploying via deploy-stlink.
2019-02-07 16:06:05 +11:00
Damien George
a81cb3576b
stm32/mboot: Add support for GPIO ports G, H, I and J.
2019-02-07 16:04:48 +11:00
Damien George
39eb1e9f81
stm32/mboot: Add support for STM32F769 MCUs.
2019-02-07 16:04:06 +11:00
Damien George
9570297dd1
stm32/mboot: Use USB HS as main USB device regardless of USB_HS_IN_FS.
2019-02-07 16:03:18 +11:00
Damien George
43a894fb48
stm32/adc: Add basic support for ADC on a pin on STM32H7 MCUs.
2019-02-06 13:35:28 +11:00
Damien George
b367c425e4
stm32/boards/stm32h743_af.csv: Add ADC entries to pin capability table.
2019-02-06 13:34:53 +11:00
Damien George
02682d52ce
stm32/boards/make-pins.py: Add basic support for STM32H7 ADC periphs.
2019-02-06 13:34:23 +11:00
Damien George
6a95e74387
esp32: Use SPIRAM in mem-map mode so all of it can be used for uPy heap.
...
Also enable CONFIG_SPIRAM_IGNORE_NOTFOUND to allow boards with faulty or
missing SPIRAM to still boot.
2019-02-06 00:10:50 +11:00
Stig Bjørlykke
98f790b03a
nrf/timer: Fix disabling Timer 1 when using soft PWM.
...
Don't exclude the Timer instance 1 entry from machine_timer_obj[] when
using soft PWM. The usage is already checked when creating the Timer,
so just create an empty entry.
2019-02-02 11:15:52 +01:00