diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-06-01 14:53:12 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-06-01 14:53:12 +0000 |
commit | 5c0d7fa73218e5e4521d9e8c4547df1211109796 (patch) | |
tree | 68982e623366db8cddb91b5ec21847e501efd341 /testhal/STM32/STM32L4xx/QSPI-N25Q128 | |
parent | 78f63bd88dfe86e2d64c57c90387041e582fa285 (diff) | |
download | ChibiOS-5c0d7fa73218e5e4521d9e8c4547df1211109796.tar.gz ChibiOS-5c0d7fa73218e5e4521d9e8c4547df1211109796.tar.bz2 ChibiOS-5c0d7fa73218e5e4521d9e8c4547df1211109796.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9552 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32/STM32L4xx/QSPI-N25Q128')
-rw-r--r-- | testhal/STM32/STM32L4xx/QSPI-N25Q128/debug/QSPI-N25Q128 (OpenOCD, Flash and Run).launch | 4 | ||||
-rw-r--r-- | testhal/STM32/STM32L4xx/QSPI-N25Q128/main.c | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/testhal/STM32/STM32L4xx/QSPI-N25Q128/debug/QSPI-N25Q128 (OpenOCD, Flash and Run).launch b/testhal/STM32/STM32L4xx/QSPI-N25Q128/debug/QSPI-N25Q128 (OpenOCD, Flash and Run).launch index 9187ae1d8..aa0c8d14a 100644 --- a/testhal/STM32/STM32L4xx/QSPI-N25Q128/debug/QSPI-N25Q128 (OpenOCD, Flash and Run).launch +++ b/testhal/STM32/STM32L4xx/QSPI-N25Q128/debug/QSPI-N25Q128 (OpenOCD, Flash and Run).launch @@ -33,9 +33,9 @@ <intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
-<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><contentList><content id="cmd-flash_cmd_receive-(format)" val="4"/><content id="cr2-adc_lld_start_conversion-(format)" val="4"/><content id="CR2-adc-null-port_wait_for_interrupt-(format)" val="4"/><content id="CR2-adc-adcp-adc_lld_start_conversion-(format)" val="4"/><content id="cfg-cmdp-qspiSend-(format)" val="4"/><content id="CR-qspi-qspip-qspi_lld_send-(format)" val="4"/><content id="CCR-qspi-qspip-qspi_lld_send-(format)" val="4"/><content id="cfg-cmdp-qspiReceive-(format)" val="4"/><content id="r2-(format)" val="4"/><content id="config-initgpio-(format)" val="4"/><content id="moder-config-initgpio-(format)" val="4"/><content id="afrh-config-initgpio-(format)" val="4"/><content id="MODER-gpiop-initgpio-(format)" val="4"/><content id="OSPEEDR-gpiop-initgpio-(format)" val="4"/><content id="PUPDR-gpiop-initgpio-(format)" val="4"/><content id="IDR-gpiop-initgpio-(format)" val="4"/><content id="ODR-gpiop-initgpio-(format)" val="4"/><content id="AFRH-gpiop-initgpio-(format)" val="4"/><content id="AFRL-gpiop-initgpio-(format)" val="4"/><content id="id[0]-id-m25qStart-(format)" val="4"/><content id="id[1]-id-m25qStart-(format)" val="4"/><content id="id[2]-id-m25qStart-(format)" val="4"/><content id="cfg-cmdp-qspi_lld_receive-(format)" val="4"/><content id="CCR-qspi-qspip-qspi_lld_receive-(format)" val="4"/></contentList>"/>
+<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><contentList><content id="CCR-qspi-qspip-config-null-_idle_thread.lto_priv.71-(format)" val="4"/><content id="SR-qspi-qspip-config-null-_idle_thread.lto_priv.71-(format)" val="4"/><content id="DCR-qspi-qspip-config-null-_idle_thread.lto_priv.71-(format)" val="4"/><content id="CR-qspi-qspip-config-null-_idle_thread.lto_priv.71-(format)" val="4"/><content id="SR-qspi-qspip-config-null-flash_xip_reset-(format)" val="4"/><content id="CR-qspi-qspip-config-null-flash_xip_reset-(format)" val="4"/><content id="channel-dma-qspip-config-null-flash_xip_reset-(format)" val="4"/><content id="SR-qspi-qspip-config-null-port_wait_for_interrupt-(format)" val="4"/><content id="SR-qspi-qspip-config-null-qspi_lld_send-(format)" val="4"/><content id="CMAR-channel-dma-qspip-config-null-port_wait_for_interrupt-(format)" val="4"/><content id="CCR-channel-dma-qspip-config-null-port_wait_for_interrupt-(format)" val="4"/><content id="CMAR-channel-dma-qspip-config-null-qspi_lld_send-(format)" val="4"/><content id="CPAR-channel-dma-qspip-config-null-qspi_lld_send-(format)" val="4"/><content id="CCR-channel-dma-qspip-config-null-qspi_lld_send-(format)" val="4"/><content id="CPAR-channel-dma-qspip-config-null-flash_xip_reset-(format)" val="4"/><content id="ISR-dma-dma-qspip-config-null-port_wait_for_interrupt-(format)" val="4"/><content id="ISR-dma-dma-qspip-config-null-qspi_lld_send-(format)" val="4"/><content id="CCR-qspi-qspip-qspi_lld_map_flash-(format)" val="4"/><content id="DCR-qspi-qspip-qspi_lld_map_flash-(format)" val="4"/><content id="SR-qspi-qspip-qspi_lld_map_flash-(format)" val="4"/><content id="CR-qspi-qspip-qspi_lld_map_flash-(format)" val="4"/><content id="cfg-cmdp-qspiMapFlash-(format)" val="4"/><content id="r2-(format)" val="4"/><content id="cmd-flash_cmd_receive-(format)" val="4"/><content id="cr2-adc_lld_start_conversion-(format)" val="4"/><content id="CR2-adc-null-port_wait_for_interrupt-(format)" val="4"/><content id="CR2-adc-adcp-adc_lld_start_conversion-(format)" val="4"/><content id="cfg-cmdp-qspiSend-(format)" val="4"/><content id="CR-qspi-qspip-qspi_lld_send-(format)" val="4"/><content id="CCR-qspi-qspip-qspi_lld_send-(format)" val="4"/><content id="cfg-cmdp-qspiReceive-(format)" val="4"/><content id="config-initgpio-(format)" val="4"/><content id="moder-config-initgpio-(format)" val="4"/><content id="afrh-config-initgpio-(format)" val="4"/><content id="MODER-gpiop-initgpio-(format)" val="4"/><content id="OSPEEDR-gpiop-initgpio-(format)" val="4"/><content id="PUPDR-gpiop-initgpio-(format)" val="4"/><content id="IDR-gpiop-initgpio-(format)" val="4"/><content id="ODR-gpiop-initgpio-(format)" val="4"/><content id="AFRH-gpiop-initgpio-(format)" val="4"/><content id="AFRL-gpiop-initgpio-(format)" val="4"/><content id="id[0]-id-m25qStart-(format)" val="4"/><content id="id[1]-id-m25qStart-(format)" val="4"/><content id="id[2]-id-m25qStart-(format)" val="4"/><content id="cfg-cmdp-qspi_lld_receive-(format)" val="4"/><content id="CCR-qspi-qspip-qspi_lld_receive-(format)" val="4"/><content id="SR-qspi-qspip-config-null-main-(format)" val="4"/><content id="CR-qspi-qspip-config-null-main-(format)" val="4"/><content id="channel-dma-qspip-config-null-_idle_thread.lto_priv.71-(format)" val="4"/><content id="CCR-channel-dma-qspip-config-null-_idle_thread.lto_priv.71-(format)" val="4"/><content id="CNDTR-channel-dma-qspip-config-null-_idle_thread.lto_priv.71-(format)" val="4"/><content id="CPAR-channel-dma-qspip-config-null-_idle_thread.lto_priv.71-(format)" val="4"/><content id="CMAR-channel-dma-qspip-config-null-_idle_thread.lto_priv.71-(format)" val="4"/></contentList>"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <globalVariableList/> "/>
-<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList/> "/>
+<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList> <memoryBlockExpressionItem> <expression text="0x90000000"/> </memoryBlockExpressionItem> </memoryBlockExpressionList> "/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="STM32L4xx-QSPI-N25Q128"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
diff --git a/testhal/STM32/STM32L4xx/QSPI-N25Q128/main.c b/testhal/STM32/STM32L4xx/QSPI-N25Q128/main.c index bd506f9e8..08e82a9ea 100644 --- a/testhal/STM32/STM32L4xx/QSPI-N25Q128/main.c +++ b/testhal/STM32/STM32L4xx/QSPI-N25Q128/main.c @@ -79,6 +79,7 @@ static THD_FUNCTION(Thread1, arg) { */
int main(void) {
flash_error_t err;
+ uint8_t *addr;
/*
* System initializations.
@@ -127,6 +128,12 @@ int main(void) { if (err != FLASH_ERROR_VERIFY)
chSysHalt("verify non-erase error");
+ /* Memory mapping the device.*/
+ m25qMemoryMap(&m25q, &addr);
+
+ /* Unmapping the device.*/
+ m25qMemoryUnmap(&m25q);
+
/* Reading it back.*/
err = flashRead(&m25q, 0, buffer, 128);
if (err != FLASH_NO_ERROR)
|