circuitpython/ports
iabdalkader eea6cd85b3 stm32/sdram: Enforce gcc opt, and use volatile and DSB in sdram_test.
Ensures consistent behaviour and resolves the D-Cache bug (the "exhaustive"
argument being lost due to cache being turned off) when O0 is used.

The changes in this commit are:

- Change -O0 to -Os because "gcc is considered broken at -O0" according to
  https://github.com/ARM-software/CMSIS_5/issues/620#issuecomment-550235656

- Use volatile for mem_base so the compiler doesn't optimise away reads or
  writes to the SDRAM, which is being tested.

- Use DSB to prevent any other compiler optimisations that would change the
  testing logic.

- Use alternating pattern/antipattern in exhaustive test to catch more
  hardware/configuration errors.

Implementation adapted by @andrewleech, taken directly from investigation
by @iabdalkader and @dpgeorge.

See #7841 and #7869 for further discussion.
2021-10-15 17:59:31 +11:00
..
bare-arm all: Update to point to files in new shared/ directory. 2021-07-12 17:08:10 +10:00
cc3200 all: Remove MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE. 2021-09-16 16:04:03 +10:00
esp32 esp32: Split out WLAN code from modnetwork.c to network_wlan.c. 2021-09-24 12:41:35 +10:00
esp8266 extmod/machine_pwm: Factor out machine.PWM bindings to common code. 2021-09-04 16:31:17 +10:00
javascript javascript/Makefile: Change variable to EXPORTED_RUNTIME_METHODS. 2021-09-01 00:42:40 +10:00
mimxrt mimxrt: Rework flash configuration. 2021-09-14 13:52:52 +02:00
minimal minimal/mpconfigport.h: Use MICROPY_CONFIG_ROM_LEVEL_MINIMUM. 2021-09-16 13:24:33 +10:00
nrf all: Remove MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE. 2021-09-16 16:04:03 +10:00
pic16bit all: Update to point to files in new shared/ directory. 2021-07-12 17:08:10 +10:00
powerpc all: Update to point to files in new shared/ directory. 2021-07-12 17:08:10 +10:00
qemu-arm all: Update to point to files in new shared/ directory. 2021-07-12 17:08:10 +10:00
rp2 rp2: Add framework for networking. 2021-09-19 23:20:13 +10:00
samd ports: Rename USBD_VID/PID config macros to MICROPY_HW_USB_VID/PID. 2021-08-07 23:13:55 +10:00
stm32 stm32/sdram: Enforce gcc opt, and use volatile and DSB in sdram_test. 2021-10-15 17:59:31 +11:00
teensy all: Update to point to files in new shared/ directory. 2021-07-12 17:08:10 +10:00
unix all: Remove MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE. 2021-09-16 16:04:03 +10:00
windows all: Remove MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE. 2021-09-16 16:04:03 +10:00
zephyr zephyr/mphalport.h: Remove unused and unimplemented C-level pin API. 2021-09-02 13:11:23 +10:00