Since __malloc_lock has not been implemented by default, newlib's malloc / _malloc_r is not reentrant or thread safe (including ISR safe). This seems like a bug.This will cause very bad interactions with user code use of malloc, including heap corrup...
I used CubeMX (v5.0.0, H7 pack v1.3.0) to generate some initialization code for the STM32H750, with the CPU core at 200 MHz and the various peripheral clocks at 100MHz.Cube then set the core voltage to PWR_REGULATOR_VOLTAGE_SCALE3 and the flash laten...
I understand that VDD needs to be 3V3 if using the internal full speed transceiver, since STM32H750VBT6 has no VDDUSB input, but if I am using an external high speed USB ULPI PHY can the mcu be run at 1V8 and still use USB? I wan't quite able to figu...
Hi,The file stm32l432xx.h defines SRAM2_BASE as 0x10000000, but the datasheet https://www.st.com/resource/en/datasheet/stm32l432kc.pdf says that SRAM2 starts at 0x2000C000, is this a typo in the HAL header?Thanks,Jacob#STM32L432 #Hal
So basically what @S.Ma said, if the library doesn't actually want a full malloc implementation, it would be a lot less confusing if it wasn't called malloc, and didn't default to malloc in the templates. It was a bit worrying to me initially to pr...
That is interesting - I am using the STM32H7 libraries (STM32Cube_FW_H7_V1.3.0), and in usbd_conf_template.h there is#define USBD_malloc mallocHowever, when I open STM32Cube_FW_L4_V1.13.0 and v1.11.0 's usbd_conf_template.h I also see#define USBD_ma...
Yes, my point is under FreeRTOS/newlib it is not really possible to provide a general ISR safe malloc, at least not without making a lot of compromises. I think this is similar for most platforms. I can't use either the C stdlib's malloc nor my RTOS'...
This just broke my code too, after I turned on the thread safety locks in newlib (__malloc_lock) for freertos. This is very broken, malloc isn't threadsafe or reentrant on newlib by default! I hacked a static array for CDC driver like the earlier pos...