- 30 3月, 2018 3 次提交
-
-
由 Damien George 提交于
Some code in mp_iternext() was only tested by the native emitter, so the tests added here test this function using just the bytecode emitter.
-
由 Damien George 提交于
The VM expects that, if mp_resume() returns MP_VM_RETURN_EXCEPTION, then the returned value is an exception instance (eg to add a traceback to it). It's possible that a value passed to a generator's throw() is not an exception so must be explicitly checked for if the thrown value is not intercepted by the generator. Thanks to @jepler for finding the bug.
-
由 Damien George 提交于
Prior to this patch the code would crash if a key in a ** dict was anything other than a str or qstr. This is because mp_setup_code_state() assumes that keys in kwargs are qstrs (for efficiency). Thanks to @jepler for finding the bug.
-
- 29 3月, 2018 4 次提交
-
-
由 Damien George 提交于
Instead of using a dedicated variable in RAM it's simpler to use the relevant bits in the DWT register.
-
由 Damien George 提交于
If the board is configured to use a bootloader then that bootloader will pass through the reset_mode.
-
由 Damien George 提交于
The main() function has a predefined type in C which is not so useful for embedded contexts. This patch renames main() to stm32_main() so we can define our own type signature for this function. The type signature is defined to have a single argument which is the "reset_mode" and is passed through as r0 from Reset_Handler. This allows, for example, a bootloader to pass through information into the main application.
-
由 Damien George 提交于
The Reset_Handler needs to copy the data section and zero the BSS, and these operations should be as optimised as possible to reduce start up time. The versions provided in this patch are about 2x faster (on a Cortex M4) than the previous implementations.
-
- 28 3月, 2018 7 次提交
-
-
由 Damien George 提交于
-
由 Damien George 提交于
Rather than pin objects themselves. The actual object is now pin_X_obj and defines are provided so that pin_X is &pin_X_obj. This makes it so that code that uses pin objects doesn't need to know if they are literals or objects (that need pointers taken) or something else. They are just entities that can be passed to the map_hal_pin_xxx functions. This mirrors how the core handles constant objects (eg mp_const_none which is &mp_const_none_obj) and allows for the possibility of different implementations of the pin layer. For example, prior to this patch there was the following: extern const pin_obj_t pin_A0; #define pyb_pin_X1 pin_A0 ... mp_hal_pin_high(&pin_A0); and now there is: extern const pin_obj_t pin_A0_obj; #define pin_A0 (&pin_A0_obj) #define pyb_pin_X1 pin_A0 ... mp_hal_pin_high(pin_A0); This patch should have minimal effect on board configuration files. The only change that may be needed is if a board has .c files that configure pins.
-
由 iabdalkader 提交于
-
由 iabdalkader 提交于
-
由 iabdalkader 提交于
The H7 SD peripheral has direct connection to MDMA instead.
-
由 Damien George 提交于
-
由 Damien George 提交于
The relevant common.ld file should now be included explicitly by a particular board.
-
- 27 3月, 2018 10 次提交
-
-
由 Damien George 提交于
This allows F767 MCUs to support a bootloader in the first sector.
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Damien George 提交于
This patch forces a board to explicitly define TEXT1_ADDR in order to split the firmware into two separate pieces. Otherwise the default is now to produce only a single continuous firmware image with all ISR, text and data together.
-
由 Damien George 提交于
To make it clearer that these addresses are both for firmware text and that they have a prescribed ordering.
-
由 Damien George 提交于
This patch allows a particular board to independently specify the linker scripts for 1) the MCU memory layout; 2) how the different firmware sections are arranged in memory. Right now all boards follow the same layout with two separate firmware section, one for the ISR and one for the text and data. This leaves room for storage (filesystem data) to live between the firmware sections. The idea with this patch is to accommodate boards that don't have internal flash storage and only need to have one continuous firmware section. Thus the common.ld script is renamed to common_ifs.ld to make explicit that it is used for cases where the board has internal flash storage.
-
由 Damien George 提交于
Explicitly writing out the implementation of sys_tick_has_passed makes these bdev files independent of systick.c and more reusable as a general component. It also reduces the code size slightly. The irq.h header is added to spibdev.c because it uses declarations in that file (irq.h is usually included implicitly via mphalport.h but not always).
-
由 Damien George 提交于
Taking the address assumes that the pin is an object (eg a struct), but it could be a literal (eg an int). Not taking the address makes this driver more general for other uses.
-
由 Damien George 提交于
genhdr/pins.h is an internal header file that defines all of the pin objects and it's cleaner to have pin.h include it (where the struct's for these objects are defined) rather than an explicit include by every user.
-
- 25 3月, 2018 2 次提交
-
-
由 Damien George 提交于
The HAL requires strict aliasing optimisation to be turned on to function correctly (at least for the SD card driver on F4 MCUs). This optimisation was recently disabled with the addition of H7 support due to the H7 HAL having errors with the strict aliasing optimisation enabled. But this is now fixed in the latest stm32lib and so the optimisation can now be re-enabled. Thanks to @chuckbook for finding that there was a problem with the SD card on F4 MCUs with the strict aliasing optimisation disabled.
-
由 Damien George 提交于
-
- 20 3月, 2018 4 次提交
-
-
由 iabdalkader 提交于
There's no uSD Transceiver on this NUCLEO board.
-
由 iabdalkader 提交于
-
由 iabdalkader 提交于
Found the timing for full (400 KHz) and FM+ (1MHz) in the HAL examples, and used CubeMX to calculate the standard value (100KHz).
-
由 iabdalkader 提交于
-
- 19 3月, 2018 3 次提交
-
-
由 Damien George 提交于
-
由 Damien George 提交于
This API matches (as close as possible) how other pyb classes allow inplace operations, such as pyb.SPI.recv(buf).
-
由 Damien George 提交于
This seems to reduce the Travis build time by roughly 1 minute / 10%.
-
- 17 3月, 2018 1 次提交
-
-
由 Damien George 提交于
The CMSIS files for the STM32 range provide macros to distinguish between the different MCU series: STM32F4, STM32F7, STM32H7, STM32L4, etc. Prefer to use these instead of custom ones.
-
- 16 3月, 2018 6 次提交
-
-
由 Damien George 提交于
-
由 Damien George 提交于
By using pre-compiled regexs, using startswith(), and explicitly checking for empty lines (of which around 30% of the input lines are), automatic qstr extraction is speed up by about 10%.
-
由 Damien George 提交于
Casting the Data array to a uint32_t* leads to strict aliasing errors on older gcc compilers.
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Damien George 提交于
-