- Jul 18, 2018
-
-
Ayke van Laethem authored
Saves for the nrf51: flash: 336 bytes RAM: 4 bytes
-
Ayke van Laethem authored
This frees 128 bytes of .bss RAM on the nRF51, at the cost of possibly more expensive GC cycles. Leave it as-is on the nRF52 as that chip has a lot more RAM. This is also done in the micro:bit: https://github.com/bbcmicrobit/micropython/blob/a7544718a7138a04168e8e6b283e14e500ffbe8b/inc/microbit/mpconfigport.h#L6
-
kaasasolut authored
-
Glenn Ruben Bakke authored
-
glennrub authored
* ports/nrf/boards: Adding linker script for nrf52832 using BLE stack s132 v.5.0.0. * ports/nrf/drivers/bluetooth: Updating makefile to add BLE_API_VERSION=4 if s132 v5.0.0 is used. * ports/nrf/drivers/bluetooth: Updating BLE stack download script to also download S132 v5.0.0. * ports/nrf/drivers/bluetooth: Updating ble_drv.c to handle BLE_API_VERSION=4 (s132 v5.0.0). * ports/nrf/boards: Updating linker script for nrf52832 with s132 v.5.0.0 bluetooth stack. * ports/nrf/drivers/bluetooth: Removing commented out code in ble_drv.c * ports/nrf/drivers/bluetooth: Updating define of GATT_MTU_SIZE_DEFAULT for SD132v5 to be defined using the new name defined in the SD headers in a more generic way. * ports/nrf/drivers/bluetooth: Cleaning up use of BLE_API_VERSION in the ble_drv.c. Also considering s140v6 API, so not all has been changed to >= if API version 3 and 4 in combo is used. New s140v6 will differ on these, and add a new API not compatible with the API for 3 and 4.
-
Glenn Ruben Bakke authored
For each iteration of polling BLE events from the Bluetooth LE stack.
-
Glenn Ruben Bakke authored
Enabled by default on microbit targets, with or without BLE stack. Also enable softpwm to make display and music module compile.
-
Glenn Ruben Bakke authored
Not all targets are using bluetooth le.
-
Glenn Ruben Bakke authored
Applicable for targets with board specific modules.
-
Glenn Ruben Bakke authored
-
Glenn Ruben Bakke authored
Increases size by 68 bytes. Should be considered to be removed as temp module is already providing this functionality.
-
Glenn Ruben Bakke authored
-
Glenn Ruben Bakke authored
To use if BLE stack is enabled. The custom linker script also set off space enough to compile in microbitfs+hal_nvmc.
-
Glenn Ruben Bakke authored
If the board has these drivers then they will be initialized: - softpwm (implicit ticker) - music module - board specific module
-
Glenn Ruben Bakke authored
Also update microbit_music_init0 to register low priority ticker callback for the music module.
-
Glenn Ruben Bakke authored
- Rename microbit_module_init to board_module_init0 which is the generic board module init function. - Add low priority callback registration of display tick handler in the module init function.
-
Glenn Ruben Bakke authored
- Rename init function to ticker_init0. - Implement ticker_register_low_pri_callback (recycle of unused set_low_priority_callback function which was unimplemented). - Add support for registering 2 low pri callbacks. For now, one intended for microbit display, and one for modmusic.
-
Glenn Ruben Bakke authored
-
Glenn Ruben Bakke authored
So that users of the board module can find the init function of the module implicitly.
-
Glenn Ruben Bakke authored
-
Glenn Ruben Bakke authored
And update the API to align with new unary/binary function callback structures.
-
Glenn Ruben Bakke authored
Makefile and mpconfigport.h update is generic, and could be used by other boards to give extra modules which are only for a selected board.
-
Glenn Ruben Bakke authored
This aligns implementation with new style structures.
-
Glenn Ruben Bakke authored
Also rename modmicrobit.h to microbitconstimage.h.
-
Glenn Ruben Bakke authored
From micro:bit port repository, https://github.com/bbcmicrobit/micropython
-
Ayke van Laethem authored
Costs 136 bytes on a nRF51822.
-
Ayke van Laethem authored
Saves 448 bytes of flash. Can still be enabled using: make FROZEN_MPY_DIR=freeze BOARD=foo
-
Glenn Ruben Bakke authored
-
Ayke van Laethem authored
Disconnecting after a connect would not restart advertising, so reconnecting may get harder.
-
Ayke van Laethem authored
The ampy tool expects a "soft reboot" line when it does a soft reset.
-
Glenn Ruben Bakke authored
Using libm from micropython free up about 5.5kb flash on nrf52 targets which have floating point enabled.
-
Ayke van Laethem authored
-
Ayke van Laethem authored
This saves about 80 bytes of code size.
-
Ayke van Laethem authored
When there is a non-BLE event (sd_evt_get), the ble_evt_handler is invoked anyway even if it returns NRF_ERROR_NOT_FOUND.
-
Ayke authored
* ports/nrf: Add micro:bit filesystem. This filesystem has been copied from BBC micro:bit sources [1] and modified to work with the nRF5x port. [1]: https://github.com/bbcmicrobit/micropython/blob/master/source/microbit/filesystem.c * ports/nrf/modules/uos: Make listdir() and ilistdir() consistent. This removes the optional direcotry paramter from ilistdir(). This is not consistent with VFS, but makes more sense when using only the microbit filesystem. Saves about 100 bytes. * ports/nrf/modules/uos: Add code size comment.
-
Ayke van Laethem authored
* Remove FLASH_ISR and merge .isr_vector into FLASH_TEXT. This saves some code space, especially on nRF52 devices. * Reserve space for nonvolatile storage of data. This is the place for a filesystem (to be added).
-
Ayke van Laethem authored
The code wasn't tested yet without a SoftDevice.
-
Glenn Ruben Bakke authored
This has been tested and works.
-
Ayke van Laethem authored
Most boards don't have an SD card so it makes no sense to have it enabled. It can be enabled per board (mpconfigboard.h).
-