aboutsummaryrefslogtreecommitdiff
path: root/stmhal
AgeCommit message (Collapse)Author
2017-02-15stmhal: Use generic interrupt char code.Damien George
2017-02-15stmhal: Implement a proper thread scheduler.Damien George
This patch changes the threading implementation from simple round-robin with busy waits on mutexs, to proper scheduling whereby threads that are waiting on a mutex are only scheduled when the mutex becomes available.
2017-02-13stmhal/boards: For STM32F411DISC, change I2C pin according to datasheet.Johannes Wågen
The pin had to be changed to get the I2C sensors on board to work.
2017-02-08stmhal/Makefile: Drop use of -mabi=aapcs-linux; link libgcc by default.Damien George
The aapcs-linux ABI is not required, instead the default aapcs ABI is enough. And using the default ABI means that the provided libgcc will now link with the firmware without warnings about variable vs fixed enums. Although the binary size increases by about 1k, RAM usage is slightly decreased. And libgcc may prove useful in the future for things like long-long division.
2017-02-07stmhal: Add ability to skip booting from SD card via /flash/SKIPSD file.Damien George
2017-02-06stmhal: Use MICROPY_EVENT_POLL_HOOK instead of __WFI where appropriate.Damien George
2017-02-06stmhal: Add pyb.fault_debug() function, to control hard-fault behaviour.Damien George
This new function controls what happens on a hard-fault: - debugging disabled: board will do a reset - debugging enabled: board will print registers and stack and flash LEDs The default is disabled, ie to do a reset. This is different to previous behaviour which flashed the LEDs and waited indefinitely.
2017-02-06stmhal: On HardFault, print stack pointer and do a stack dump.Damien George
2017-02-03stmhal/mpconfigport.h: Enable MICROPY_PY_BUILTINS_POW3 option.Damien George
2017-01-31stmhal: Fix build issue when MICROPY_PY_THREAD is disabled.Damien George
2017-01-31stmhal/main: Use _estack value to initialise stack extents.Damien George
2017-01-31stmhal: Initial implementation of multithreading, currently disabled.Damien George
This patch brings the _thread module to stmhal/pyboard. There is a very simple round-robin thread scheduler, which is disabled if there is only one thread (for efficiency when threading is not used). The scheduler currently switches threads at a rate of 250Hz using the systick timer and the pend-SV interrupt. The GIL is disabled so one must be careful to use lock objects to prevent concurrent access of objects. The threading is disabled by default, one can enabled it with the config option MICROPY_PY_THREAD to test it out.
2017-01-31stmhal/pendsv: Fill in comments about what the stack contains.Damien George
2017-01-31stmhal/main: Guard init_sdcard_fs with MICROPY_HW_HAS_SDCARD.Damien George
2017-01-31stmhal/modmachine: Add machine.Signal type.Damien George
2017-01-31stmhal/pin: Add C-level pin ioctl method.Damien George
2017-01-31stmhal/main: Put /sd directory before /flash in sys.path.Damien George
If the SD card is mounted then its libraries (ie those that are imported) should override any in /flash.
2017-01-31stmhal: On boot, mount all available partitions of the SD card.Damien George
The first partition is mounted as "/sd" and subsequent partitions are mounted as "/sd<part_num>". This is backwards compatible with the previous behaviour, which just mounted the first partition on "/sd". At this point, only FatFs filesystems are mounted.
2017-01-31stmhal/README: Add paragraph about building mpy-cross.Damien George
2017-01-30stmhal: Fix stack pointer initialisation for F411 and F429 boards.Damien George
The stack pointer should start pointing 1 byte past the top of the end of RAM.
2017-01-30stmhal: Set the FatFs partition number when initialising VFS object.Damien George
stmhal has MULTI_PARTITION enabled for FatFs and so these values need to be initialised.
2017-01-30stmhal: Use LED constants from PYBv4 onwards.Damien George
2017-01-30extmod: Merge old fsusermount.h header into vfs.h and vfs_fat.h.Damien George
vfs.h is for generic VFS declarations, and vfs_fat.h is for VfsFat specific things.
2017-01-30extmod/vfs_fat: Remove MICROPY_FATFS_OO config option.Damien George
Everyone should now be using the new ooFatFs library. The old one is no longer supported and will be removed.
2017-01-29stmhal/moduos: Remove duplicated chdir.Damien George
2017-01-29stmhal: Fix name of automatically created boot.py.Damien George
2017-01-27stmhal: Convert to use VFS sub-system and new ooFatFs component.Damien George
This patch makes the following configuration changes: - MICROPY_FSUSERMOUNT is disabled, removing old mounting infrastructure - MICROPY_VFS is enabled, giving new VFS sub-system - MICROPY_VFS_FAT is enabled, giving uos.VfsFat type - MICROPY_FATFS_OO is enabled, to use new ooFatFs lib, R0.12b User facing API should be almost unchanged. Most notable changes are removal of os.mkfs (use os.VfsFat.mkfs instead) and pyb.mount doesn't allow unmounting by passing None as the device.
2017-01-27stmhal/usbd_msc_storage: Use storage functions instead of disk ones.Damien George
2017-01-27extmod/vfs: Add ability for VFS sub-system to import using VfsFat.Damien George
2017-01-27extmod: Rename vfs_fat_file.h to vfs_fat.h.Damien George
And move declaration of mp_fat_vfs_type to this file.
2017-01-24stmhal/mpconfigport.h: Reorganise the config options into groups.Damien George
The order now follows that in py/mpconfig.h and is a bit cleaner and easier to maintain. No options were changed/added/removed with this patch, it's just a reordering.
2017-01-24stmhal/boards/STM32L476DISC: Use external SPI flash for filesystem.Damien George
2017-01-24stmhal: Add ability to have filesystem stored on external SPI flash.Damien George
To use this feature a port should define MICROPY_HW_SPIFLASH_SIZE_BITS along with x_CS, x_SCK, x_MOSI, x_MISO (x=MICROPY_HW_SPIFLASH). This will then use external SPI flash on those pins instead of the internal flash. The SPI is done using the software implementation. There is currently only support for standard SPI (ie not dual or quad mode).
2017-01-24stmhal: Fix examples in openocd configs to include addresses.Pavol Rusnak
2017-01-23stmhal: Add default frozen-bytecode directory and link lcd160cr driver.Damien George
stmhal will now be built by default with frozen bytecode from scripts stored in the stmhal/modules/ directory. This can be disabled or changed to another directory by overridding the make variable FROZEN_MPY_DIR.
2017-01-22stmhal: Enable help('modules') feature.Damien George
2017-01-22stmhal: Convert to use builtin help function.Damien George
2017-01-19stmhal: Implement SNAK/CNAK mechanism for USB HID receive.Pavol Rusnak
This implements flow control in case user does not call recv method often enough (it tells host side to stop sending more data).
2017-01-19stmhal: Implement ioctl for USB HID read.Pavol Rusnak
2017-01-19stmhal: Fix USB HID receive not receiving the first packet.Pavol Rusnak
2017-01-12stmhal: fix wrong usage of gcc -print-libgcc-file-namePavol Rusnak
2017-01-12stmhal: Support PortG on STM32L476 and STM32L486.Dave Hylands
2017-01-04all: Consistently update signatures of .make_new and .call methods.Paul Sokolovsky
Otherwise, they serve reoccurring source of copy-paste mistakes and breaking nanbox build.
2016-12-28stmhal/uart: Increase inter-character timeout by 1ms.Damien George
Sys-tick resolution is 1ms and a value of 2 will give a delay between 1ms and 2ms (whereas a value of 1 gives a delay between 0ms and 1ms, which is too short).
2016-12-28stmhal/uart: Provide a custom function to transmit over UART.Damien George
The HAL_UART_Transmit function has changed in the latest HAL version such that the Timeout is a timeout for the entire function, rather than a timeout between characters as it was before. The HAL function also does not allow one to reliably tell how many characters were sent before the timeout (if a timeout occurred). This patch provides a custom function to do UART transmission, completely replacing the HAL version, to fix the above-mentioned issues.
2016-12-23stmhal, esp8266: Enable utimeq module.Paul Sokolovsky
2016-12-22stmhal: Add support for STM32 Nucleo64 L476RG.sergiuszm
2016-12-22stmhal/sdcard: Use mp_hal_pin_config function instead of HAL_GPIO_Init.Damien George
There is a minor functional change with this patch, that the GPIO are now configured in fast mode, whereas they were in high speed mode before. But the SDIO should still work because SD CK frequency is at most 25MHz.
2016-12-22stmhal/led: Use mp_hal_pin_config function instead of HAL_GPIO_Init.Damien George
2016-12-22stmhal/usrsw: Use mp_hal_pin_config function instead of HAL_GPIO_Init.Damien George