From a57cc2c988482010061b9e68344fdf1969889763 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Tue, 12 Jan 2016 14:06:54 -0800 Subject: initial commit, FreeRTOS_BSP_1.0.0_iMX7D --- .../adc_imx7d/armgcc/CMakeLists.txt | 134 + .../driver_examples/adc_imx7d/armgcc/build_all.bat | 5 + .../driver_examples/adc_imx7d/armgcc/build_all.sh | 5 + .../adc_imx7d/armgcc/build_debug.bat | 3 + .../adc_imx7d/armgcc/build_debug.sh | 3 + .../adc_imx7d/armgcc/build_release.bat | 3 + .../adc_imx7d/armgcc/build_release.sh | 3 + .../driver_examples/adc_imx7d/armgcc/clean.bat | 3 + .../driver_examples/adc_imx7d/armgcc/clean.sh | 3 + .../driver_examples/adc_imx7d/ds5/.cproject | 137 + .../driver_examples/adc_imx7d/ds5/.project | 86 + .../adc_imx7d/ds5/adc_imx7d_example.wsd | 9 + .../driver_examples/adc_imx7d/ds5/makedir.bat | 1 + .../driver_examples/adc_imx7d/hardware_init.c | 54 + .../adc_imx7d/iar/adc_imx7d_example.ewd | 9419 ++++++++++++++++++++ .../adc_imx7d/iar/adc_imx7d_example.ewp | 1891 ++++ .../adc_imx7d/iar/adc_imx7d_example.eww | 4 + .../imx7d_val_m4/driver_examples/adc_imx7d/main.c | 92 + .../ecspi_interrupt/master/armgcc/CMakeLists.txt | 132 + .../ecspi_interrupt/master/armgcc/build_all.bat | 5 + .../ecspi_interrupt/master/armgcc/build_all.sh | 5 + .../ecspi_interrupt/master/armgcc/build_debug.bat | 3 + .../ecspi_interrupt/master/armgcc/build_debug.sh | 3 + .../master/armgcc/build_release.bat | 3 + .../ecspi_interrupt/master/armgcc/build_release.sh | 3 + .../ecspi/ecspi_interrupt/master/armgcc/clean.bat | 3 + .../ecspi/ecspi_interrupt/master/armgcc/clean.sh | 3 + .../ecspi/ecspi_interrupt/master/ds5/.cproject | 137 + .../ecspi/ecspi_interrupt/master/ds5/.project | 86 + .../master/ds5/ecspi_interrupt_master_example.wsd | 9 + .../ecspi/ecspi_interrupt/master/ds5/makedir.bat | 1 + .../ecspi/ecspi_interrupt/master/hardware_init.c | 56 + .../master/iar/ecspi_interrupt_master_example.ewd | 9419 ++++++++++++++++++++ .../master/iar/ecspi_interrupt_master_example.ewp | 1891 ++++ .../master/iar/ecspi_interrupt_master_example.eww | 4 + .../ecspi/ecspi_interrupt/master/main.c | 288 + .../ecspi_interrupt/slave/armgcc/CMakeLists.txt | 132 + .../ecspi_interrupt/slave/armgcc/build_all.bat | 5 + .../ecspi_interrupt/slave/armgcc/build_all.sh | 5 + .../ecspi_interrupt/slave/armgcc/build_debug.bat | 3 + .../ecspi_interrupt/slave/armgcc/build_debug.sh | 3 + .../ecspi_interrupt/slave/armgcc/build_release.bat | 3 + .../ecspi_interrupt/slave/armgcc/build_release.sh | 3 + .../ecspi/ecspi_interrupt/slave/armgcc/clean.bat | 3 + .../ecspi/ecspi_interrupt/slave/armgcc/clean.sh | 3 + .../ecspi/ecspi_interrupt/slave/ds5/.cproject | 137 + .../ecspi/ecspi_interrupt/slave/ds5/.project | 86 + .../slave/ds5/ecspi_interrupt_slave_example.wsd | 9 + .../ecspi/ecspi_interrupt/slave/ds5/makedir.bat | 1 + .../ecspi/ecspi_interrupt/slave/hardware_init.c | 56 + .../slave/iar/ecspi_interrupt_slave_example.ewd | 9419 ++++++++++++++++++++ .../slave/iar/ecspi_interrupt_slave_example.ewp | 1891 ++++ .../slave/iar/ecspi_interrupt_slave_example.eww | 4 + .../ecspi/ecspi_interrupt/slave/main.c | 175 + .../flexcan/flexcan_loopback/armgcc/CMakeLists.txt | 136 + .../flexcan/flexcan_loopback/armgcc/build_all.bat | 5 + .../flexcan/flexcan_loopback/armgcc/build_all.sh | 5 + .../flexcan_loopback/armgcc/build_debug.bat | 3 + .../flexcan/flexcan_loopback/armgcc/build_debug.sh | 3 + .../flexcan_loopback/armgcc/build_release.bat | 3 + .../flexcan_loopback/armgcc/build_release.sh | 3 + .../flexcan/flexcan_loopback/armgcc/clean.bat | 3 + .../flexcan/flexcan_loopback/armgcc/clean.sh | 3 + .../flexcan/flexcan_loopback/ds5/.cproject | 137 + .../flexcan/flexcan_loopback/ds5/.project | 86 + .../ds5/flexcan_loopback_example.wsd | 9 + .../flexcan/flexcan_loopback/ds5/makedir.bat | 1 + .../flexcan/flexcan_loopback/hardware_init.c | 70 + .../iar/flexcan_loopback_example.ewd | 9419 ++++++++++++++++++++ .../iar/flexcan_loopback_example.ewp | 1891 ++++ .../iar/flexcan_loopback_example.eww | 4 + .../flexcan/flexcan_loopback/main.c | 212 + .../flexcan/flexcan_network/armgcc/CMakeLists.txt | 136 + .../flexcan/flexcan_network/armgcc/build_all.bat | 5 + .../flexcan/flexcan_network/armgcc/build_all.sh | 5 + .../flexcan/flexcan_network/armgcc/build_debug.bat | 3 + .../flexcan/flexcan_network/armgcc/build_debug.sh | 3 + .../flexcan_network/armgcc/build_release.bat | 3 + .../flexcan_network/armgcc/build_release.sh | 3 + .../flexcan/flexcan_network/armgcc/clean.bat | 3 + .../flexcan/flexcan_network/armgcc/clean.sh | 3 + .../flexcan/flexcan_network/ds5/.cproject | 137 + .../flexcan/flexcan_network/ds5/.project | 86 + .../ds5/flexcan_network_example.wsd | 9 + .../flexcan/flexcan_network/ds5/makedir.bat | 1 + .../flexcan/flexcan_network/hardware_init.c | 70 + .../iar/flexcan_network_example.ewd | 9419 ++++++++++++++++++++ .../iar/flexcan_network_example.ewp | 1891 ++++ .../iar/flexcan_network_example.eww | 4 + .../driver_examples/flexcan/flexcan_network/main.c | 221 + .../driver_examples/gpio_imx/armgcc/CMakeLists.txt | 134 + .../driver_examples/gpio_imx/armgcc/build_all.bat | 5 + .../driver_examples/gpio_imx/armgcc/build_all.sh | 5 + .../gpio_imx/armgcc/build_debug.bat | 3 + .../driver_examples/gpio_imx/armgcc/build_debug.sh | 3 + .../gpio_imx/armgcc/build_release.bat | 3 + .../gpio_imx/armgcc/build_release.sh | 3 + .../driver_examples/gpio_imx/armgcc/clean.bat | 3 + .../driver_examples/gpio_imx/armgcc/clean.sh | 3 + .../driver_examples/gpio_imx/ds5/.cproject | 137 + .../driver_examples/gpio_imx/ds5/.project | 86 + .../gpio_imx/ds5/gpio_imx_example.wsd | 9 + .../driver_examples/gpio_imx/ds5/makedir.bat | 1 + .../driver_examples/gpio_imx/hardware_init.c | 57 + .../gpio_imx/iar/gpio_imx_example.ewd | 9419 ++++++++++++++++++++ .../gpio_imx/iar/gpio_imx_example.ewp | 1891 ++++ .../gpio_imx/iar/gpio_imx_example.eww | 4 + .../imx7d_val_m4/driver_examples/gpio_imx/main.c | 147 + .../driver_examples/gpt/armgcc/CMakeLists.txt | 132 + .../driver_examples/gpt/armgcc/build_all.bat | 5 + .../driver_examples/gpt/armgcc/build_all.sh | 5 + .../driver_examples/gpt/armgcc/build_debug.bat | 3 + .../driver_examples/gpt/armgcc/build_debug.sh | 3 + .../driver_examples/gpt/armgcc/build_release.bat | 3 + .../driver_examples/gpt/armgcc/build_release.sh | 3 + .../driver_examples/gpt/armgcc/clean.bat | 3 + .../driver_examples/gpt/armgcc/clean.sh | 3 + .../imx7d_val_m4/driver_examples/gpt/ds5/.cproject | 137 + .../imx7d_val_m4/driver_examples/gpt/ds5/.project | 86 + .../driver_examples/gpt/ds5/gpt_example.wsd | 9 + .../driver_examples/gpt/ds5/makedir.bat | 1 + .../driver_examples/gpt/hardware_init.c | 68 + .../driver_examples/gpt/iar/gpt_example.ewd | 9419 ++++++++++++++++++++ .../driver_examples/gpt/iar/gpt_example.ewp | 1891 ++++ .../driver_examples/gpt/iar/gpt_example.eww | 4 + examples/imx7d_val_m4/driver_examples/gpt/main.c | 135 + .../i2c_imx/i2c_interrupt/armgcc/CMakeLists.txt | 132 + .../i2c_imx/i2c_interrupt/armgcc/build_all.bat | 5 + .../i2c_imx/i2c_interrupt/armgcc/build_all.sh | 5 + .../i2c_imx/i2c_interrupt/armgcc/build_debug.bat | 3 + .../i2c_imx/i2c_interrupt/armgcc/build_debug.sh | 3 + .../i2c_imx/i2c_interrupt/armgcc/build_release.bat | 3 + .../i2c_imx/i2c_interrupt/armgcc/build_release.sh | 3 + .../i2c_imx/i2c_interrupt/armgcc/clean.bat | 3 + .../i2c_imx/i2c_interrupt/armgcc/clean.sh | 3 + .../i2c_imx/i2c_interrupt/ds5/.cproject | 137 + .../i2c_imx/i2c_interrupt/ds5/.project | 86 + .../ds5/i2c_imx_interrupt_example.wsd | 9 + .../i2c_imx/i2c_interrupt/ds5/makedir.bat | 1 + .../i2c_imx/i2c_interrupt/hardware_init.c | 60 + .../iar/i2c_imx_interrupt_example.ewd | 9419 ++++++++++++++++++++ .../iar/i2c_imx_interrupt_example.ewp | 1891 ++++ .../iar/i2c_imx_interrupt_example.eww | 4 + .../driver_examples/i2c_imx/i2c_interrupt/main.c | 388 + .../uart_imx/uart_interrupt/armgcc/CMakeLists.txt | 130 + .../uart_imx/uart_interrupt/armgcc/build_all.bat | 5 + .../uart_imx/uart_interrupt/armgcc/build_all.sh | 5 + .../uart_imx/uart_interrupt/armgcc/build_debug.bat | 3 + .../uart_imx/uart_interrupt/armgcc/build_debug.sh | 3 + .../uart_interrupt/armgcc/build_release.bat | 3 + .../uart_interrupt/armgcc/build_release.sh | 3 + .../uart_imx/uart_interrupt/armgcc/clean.bat | 3 + .../uart_imx/uart_interrupt/armgcc/clean.sh | 3 + .../uart_imx/uart_interrupt/ds5/.cproject | 137 + .../uart_imx/uart_interrupt/ds5/.project | 86 + .../uart_imx/uart_interrupt/ds5/makedir.bat | 1 + .../ds5/uart_imx_interrupt_example.wsd | 9 + .../uart_imx/uart_interrupt/hardware_init.c | 57 + .../iar/uart_imx_interrupt_example.ewd | 9419 ++++++++++++++++++++ .../iar/uart_imx_interrupt_example.ewp | 1891 ++++ .../iar/uart_imx_interrupt_example.eww | 4 + .../driver_examples/uart_imx/uart_interrupt/main.c | 218 + .../driver_examples/wdog_imx/armgcc/CMakeLists.txt | 130 + .../driver_examples/wdog_imx/armgcc/build_all.bat | 5 + .../driver_examples/wdog_imx/armgcc/build_all.sh | 5 + .../wdog_imx/armgcc/build_debug.bat | 3 + .../driver_examples/wdog_imx/armgcc/build_debug.sh | 3 + .../wdog_imx/armgcc/build_release.bat | 3 + .../wdog_imx/armgcc/build_release.sh | 3 + .../driver_examples/wdog_imx/armgcc/clean.bat | 3 + .../driver_examples/wdog_imx/armgcc/clean.sh | 3 + .../driver_examples/wdog_imx/ds5/.cproject | 137 + .../driver_examples/wdog_imx/ds5/.project | 86 + .../driver_examples/wdog_imx/ds5/makedir.bat | 1 + .../wdog_imx/ds5/wdog_imx_example.wsd | 9 + .../driver_examples/wdog_imx/hardware_init.c | 55 + .../wdog_imx/iar/wdog_imx_example.ewd | 9419 ++++++++++++++++++++ .../wdog_imx/iar/wdog_imx_example.ewp | 1891 ++++ .../wdog_imx/iar/wdog_imx_example.eww | 4 + .../imx7d_val_m4/driver_examples/wdog_imx/main.c | 79 + 180 files changed, 119636 insertions(+) create mode 100644 examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/CMakeLists.txt create mode 100755 examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_all.bat create mode 100755 examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_all.sh create mode 100755 examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_debug.bat create mode 100755 examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_debug.sh create mode 100755 examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_release.bat create mode 100755 examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_release.sh create mode 100755 examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/clean.bat create mode 100755 examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/clean.sh create mode 100644 examples/imx7d_val_m4/driver_examples/adc_imx7d/ds5/.cproject create mode 100644 examples/imx7d_val_m4/driver_examples/adc_imx7d/ds5/.project create mode 100644 examples/imx7d_val_m4/driver_examples/adc_imx7d/ds5/adc_imx7d_example.wsd create mode 100755 examples/imx7d_val_m4/driver_examples/adc_imx7d/ds5/makedir.bat create mode 100644 examples/imx7d_val_m4/driver_examples/adc_imx7d/hardware_init.c create mode 100644 examples/imx7d_val_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.ewd create mode 100644 examples/imx7d_val_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.ewp create mode 100644 examples/imx7d_val_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.eww create mode 100644 examples/imx7d_val_m4/driver_examples/adc_imx7d/main.c create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/CMakeLists.txt create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_all.bat create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_all.sh create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_debug.bat create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_debug.sh create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_release.bat create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_release.sh create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/clean.bat create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/clean.sh create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/ds5/.cproject create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/ds5/.project create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/ds5/ecspi_interrupt_master_example.wsd create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/ds5/makedir.bat create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/hardware_init.c create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/iar/ecspi_interrupt_master_example.ewd create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/iar/ecspi_interrupt_master_example.ewp create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/iar/ecspi_interrupt_master_example.eww create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/main.c create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/CMakeLists.txt create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_all.bat create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_all.sh create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_debug.bat create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_debug.sh create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_release.bat create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_release.sh create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/clean.bat create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/clean.sh create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/ds5/.cproject create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/ds5/.project create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/ds5/ecspi_interrupt_slave_example.wsd create mode 100755 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/ds5/makedir.bat create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/hardware_init.c create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/iar/ecspi_interrupt_slave_example.ewd create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/iar/ecspi_interrupt_slave_example.ewp create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/iar/ecspi_interrupt_slave_example.eww create mode 100644 examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/main.c create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/CMakeLists.txt create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_all.bat create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_all.sh create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_debug.bat create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_debug.sh create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_release.bat create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_release.sh create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/clean.bat create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/clean.sh create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/ds5/.cproject create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/ds5/.project create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/ds5/flexcan_loopback_example.wsd create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/ds5/makedir.bat create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/hardware_init.c create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.ewd create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.ewp create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.eww create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/main.c create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/CMakeLists.txt create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_all.bat create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_all.sh create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_debug.bat create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_debug.sh create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_release.bat create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_release.sh create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/clean.bat create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/clean.sh create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/ds5/.cproject create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/ds5/.project create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/ds5/flexcan_network_example.wsd create mode 100755 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/ds5/makedir.bat create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/hardware_init.c create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.ewd create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.ewp create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.eww create mode 100644 examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/main.c create mode 100644 examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/CMakeLists.txt create mode 100755 examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_all.bat create mode 100755 examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_all.sh create mode 100755 examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_debug.bat create mode 100755 examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_debug.sh create mode 100755 examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_release.bat create mode 100755 examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_release.sh create mode 100755 examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/clean.bat create mode 100755 examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/clean.sh create mode 100644 examples/imx7d_val_m4/driver_examples/gpio_imx/ds5/.cproject create mode 100644 examples/imx7d_val_m4/driver_examples/gpio_imx/ds5/.project create mode 100644 examples/imx7d_val_m4/driver_examples/gpio_imx/ds5/gpio_imx_example.wsd create mode 100755 examples/imx7d_val_m4/driver_examples/gpio_imx/ds5/makedir.bat create mode 100644 examples/imx7d_val_m4/driver_examples/gpio_imx/hardware_init.c create mode 100644 examples/imx7d_val_m4/driver_examples/gpio_imx/iar/gpio_imx_example.ewd create mode 100644 examples/imx7d_val_m4/driver_examples/gpio_imx/iar/gpio_imx_example.ewp create mode 100644 examples/imx7d_val_m4/driver_examples/gpio_imx/iar/gpio_imx_example.eww create mode 100644 examples/imx7d_val_m4/driver_examples/gpio_imx/main.c create mode 100644 examples/imx7d_val_m4/driver_examples/gpt/armgcc/CMakeLists.txt create mode 100755 examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_all.bat create mode 100755 examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_all.sh create mode 100755 examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_debug.bat create mode 100755 examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_debug.sh create mode 100755 examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_release.bat create mode 100755 examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_release.sh create mode 100755 examples/imx7d_val_m4/driver_examples/gpt/armgcc/clean.bat create mode 100755 examples/imx7d_val_m4/driver_examples/gpt/armgcc/clean.sh create mode 100644 examples/imx7d_val_m4/driver_examples/gpt/ds5/.cproject create mode 100644 examples/imx7d_val_m4/driver_examples/gpt/ds5/.project create mode 100644 examples/imx7d_val_m4/driver_examples/gpt/ds5/gpt_example.wsd create mode 100755 examples/imx7d_val_m4/driver_examples/gpt/ds5/makedir.bat create mode 100644 examples/imx7d_val_m4/driver_examples/gpt/hardware_init.c create mode 100644 examples/imx7d_val_m4/driver_examples/gpt/iar/gpt_example.ewd create mode 100644 examples/imx7d_val_m4/driver_examples/gpt/iar/gpt_example.ewp create mode 100644 examples/imx7d_val_m4/driver_examples/gpt/iar/gpt_example.eww create mode 100644 examples/imx7d_val_m4/driver_examples/gpt/main.c create mode 100644 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/CMakeLists.txt create mode 100755 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_all.bat create mode 100755 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_all.sh create mode 100755 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_debug.bat create mode 100755 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_debug.sh create mode 100755 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_release.bat create mode 100755 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_release.sh create mode 100755 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/clean.bat create mode 100755 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/clean.sh create mode 100644 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/ds5/.cproject create mode 100644 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/ds5/.project create mode 100644 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/ds5/i2c_imx_interrupt_example.wsd create mode 100755 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/ds5/makedir.bat create mode 100644 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/hardware_init.c create mode 100644 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/iar/i2c_imx_interrupt_example.ewd create mode 100644 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/iar/i2c_imx_interrupt_example.ewp create mode 100644 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/iar/i2c_imx_interrupt_example.eww create mode 100644 examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/main.c create mode 100644 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/CMakeLists.txt create mode 100755 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_all.bat create mode 100755 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_all.sh create mode 100755 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_debug.bat create mode 100755 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_debug.sh create mode 100755 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_release.bat create mode 100755 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_release.sh create mode 100755 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/clean.bat create mode 100755 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/clean.sh create mode 100644 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/ds5/.cproject create mode 100644 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/ds5/.project create mode 100755 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/ds5/makedir.bat create mode 100644 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/ds5/uart_imx_interrupt_example.wsd create mode 100644 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/hardware_init.c create mode 100644 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.ewd create mode 100644 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.ewp create mode 100644 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.eww create mode 100644 examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/main.c create mode 100644 examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/CMakeLists.txt create mode 100755 examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_all.bat create mode 100755 examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_all.sh create mode 100755 examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_debug.bat create mode 100755 examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_debug.sh create mode 100755 examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_release.bat create mode 100755 examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_release.sh create mode 100755 examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/clean.bat create mode 100755 examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/clean.sh create mode 100644 examples/imx7d_val_m4/driver_examples/wdog_imx/ds5/.cproject create mode 100644 examples/imx7d_val_m4/driver_examples/wdog_imx/ds5/.project create mode 100755 examples/imx7d_val_m4/driver_examples/wdog_imx/ds5/makedir.bat create mode 100644 examples/imx7d_val_m4/driver_examples/wdog_imx/ds5/wdog_imx_example.wsd create mode 100644 examples/imx7d_val_m4/driver_examples/wdog_imx/hardware_init.c create mode 100644 examples/imx7d_val_m4/driver_examples/wdog_imx/iar/wdog_imx_example.ewd create mode 100644 examples/imx7d_val_m4/driver_examples/wdog_imx/iar/wdog_imx_example.ewp create mode 100644 examples/imx7d_val_m4/driver_examples/wdog_imx/iar/wdog_imx_example.eww create mode 100644 examples/imx7d_val_m4/driver_examples/wdog_imx/main.c (limited to 'examples/imx7d_val_m4/driver_examples') diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/CMakeLists.txt b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/CMakeLists.txt new file mode 100644 index 0000000..c6d27e8 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/CMakeLists.txt @@ -0,0 +1,134 @@ +INCLUDE(CMakeForceCompiler) + +# CROSS COMPILER SETTING +SET(CMAKE_SYSTEM_NAME Generic) +CMAKE_MINIMUM_REQUIRED (VERSION 2.6) + +# THE VERSION NUMBER +SET (Tutorial_VERSION_MAJOR 1) +SET (Tutorial_VERSION_MINOR 0) + +# ENABLE ASM +ENABLE_LANGUAGE(ASM) + +SET(CMAKE_STATIC_LIBRARY_PREFIX) +SET(CMAKE_STATIC_LIBRARY_SUFFIX) + +SET(CMAKE_EXECUTABLE_LIBRARY_PREFIX) +SET(CMAKE_EXECUTABLE_LIBRARY_SUFFIX) + + +# CURRENT DIRECTORY +SET(ProjDirPath ${CMAKE_CURRENT_SOURCE_DIR}) + +# DEBUG LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -T${ProjDirPath}/../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# RELEASE LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -T${ProjDirPath}/../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# DEBUG ASM FLAGS +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG C FLAGS +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# RELEASE ASM FLAGS +SET(CMAKE_ASM_FLAGS_RELEASE "${CMAKE_ASM_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE C FLAGS +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# ASM MACRO +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -D__DEBUG") + +# C MACRO +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__DEBUG") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCPU_IMX7D_M4") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DPRINTF_FLOAT_ENABLE") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D__NDEBUG") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DCPU_IMX7D_M4") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DPRINTF_FLOAT_ENABLE") + +# CXX MACRO + +# INCLUDE_DIRECTORIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(adc_imx7d_example + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../platform/utilities/src/debug_console_imx.c" + "${ProjDirPath}/../../../../../platform/utilities/inc/debug_console_imx.h" + "${ProjDirPath}/../../../../../platform/utilities/src/print_scan.c" + "${ProjDirPath}/../../../../../platform/utilities/src/print_scan.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/ccm_analog_imx7d.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/ccm_imx7d.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/rdc.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/rdc_defs_imx7d.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/wdog_imx.h" + "${ProjDirPath}/../../../../../platform/drivers/src/ccm_analog_imx7d.c" + "${ProjDirPath}/../../../../../platform/drivers/src/ccm_imx7d.c" + "${ProjDirPath}/../../../../../platform/drivers/src/rdc.c" + "${ProjDirPath}/../../../../../platform/drivers/src/wdog_imx.c" + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c" + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.h" + "${ProjDirPath}/../../../pin_mux.c" + "${ProjDirPath}/../../../pin_mux.h" + "${ProjDirPath}/../../../board.c" + "${ProjDirPath}/../../../board.h" + "${ProjDirPath}/../../../clock_freq.c" + "${ProjDirPath}/../../../clock_freq.h" + "${ProjDirPath}/../hardware_init.c" + "${ProjDirPath}/../main.c" + "${ProjDirPath}/../../../../../platform/drivers/src/adc_imx7d.c" + "${ProjDirPath}/../../../../../platform/drivers/inc/adc_imx7d.h" + "${ProjDirPath}/../../../../../platform/drivers/src/uart_imx.c" + "${ProjDirPath}/../../../../../platform/drivers/inc/uart_imx.h" +) +SET_TARGET_PROPERTIES(adc_imx7d_example PROPERTIES OUTPUT_NAME "adc_imx7d_example.elf") + +TARGET_LINK_LIBRARIES(adc_imx7d_example -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(adc_imx7d_example m) +TARGET_LINK_LIBRARIES(adc_imx7d_example c) +TARGET_LINK_LIBRARIES(adc_imx7d_example gcc) +TARGET_LINK_LIBRARIES(adc_imx7d_example nosys) +TARGET_LINK_LIBRARIES(adc_imx7d_example -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/adc_imx7d_example.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/adc_imx7d_example.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET adc_imx7d_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/adc_imx7d_example.elf ${EXECUTABLE_OUTPUT_PATH}/adc_imx7d_example.hex) +ADD_CUSTOM_COMMAND(TARGET adc_imx7d_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/adc_imx7d_example.elf ${EXECUTABLE_OUTPUT_PATH}/adc_imx7d_example.bin) diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_all.bat b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_all.bat new file mode 100755 index 0000000..6d41d86 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_all.bat @@ -0,0 +1,5 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_all.sh b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_all.sh new file mode 100755 index 0000000..ebb0c25 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_all.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_debug.bat b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_debug.bat new file mode 100755 index 0000000..bf3b902 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_debug.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_debug.sh b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_debug.sh new file mode 100755 index 0000000..571868b --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_debug.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_release.bat b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_release.bat new file mode 100755 index 0000000..e229a83 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_release.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_release.sh b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_release.sh new file mode 100755 index 0000000..035ce4e --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/build_release.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/clean.bat b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/clean.bat @@ -0,0 +1,3 @@ +RD /s /Q Debug Release CMakeFiles +DEL /s /Q /F Makefile cmake_install.cmake CMakeCache.txt +pause diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/clean.sh b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/armgcc/clean.sh @@ -0,0 +1,3 @@ +#!/bin/sh +rm -rf debug release CMakeFiles +rm -rf Makefile cmake_install.cmake CMakeCache.txt diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/ds5/.cproject b/examples/imx7d_val_m4/driver_examples/adc_imx7d/ds5/.cproject new file mode 100644 index 0000000..fd94414 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/ds5/.project b/examples/imx7d_val_m4/driver_examples/adc_imx7d/ds5/.project new file mode 100644 index 0000000..38b793a --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/ds5/.project @@ -0,0 +1,86 @@ + + + adc_imx7d_example_imx7d_val_m4 + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.autoBuildTarget + all + + + org.eclipse.cdt.make.core.buildArguments + + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.buildLocation + + + + org.eclipse.cdt.make.core.cleanBuildTarget + clean + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.fullBuildTarget + all + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + startup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sutilities2virtual:/virtualutilities/debug_console_imx.c1PARENT-5-PROJECT_LOC/platform/utilities/src/debug_console_imx.cutilities2virtual:/virtualutilities/debug_console_imx.h1PARENT-5-PROJECT_LOC/platform/utilities/inc/debug_console_imx.hutilities2virtual:/virtualutilities/print_scan.c1PARENT-5-PROJECT_LOC/platform/utilities/src/print_scan.cutilities2virtual:/virtualutilities/print_scan.h1PARENT-5-PROJECT_LOC/platform/utilities/src/print_scan.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/ccm_analog_imx7d.hsystem2virtual:/virtualsystem/ccm_imx7d.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/ccm_imx7d.hsystem2virtual:/virtualsystem/rdc.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/rdc.hsystem2virtual:/virtualsystem/rdc_defs_imx7d.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/rdc_defs_imx7d.hsystem2virtual:/virtualsystem/wdog_imx.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/wdog_imx.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.c1PARENT-5-PROJECT_LOC/platform/drivers/src/ccm_analog_imx7d.csystem2virtual:/virtualsystem/ccm_imx7d.c1PARENT-5-PROJECT_LOC/platform/drivers/src/ccm_imx7d.csystem2virtual:/virtualsystem/rdc.c1PARENT-5-PROJECT_LOC/platform/drivers/src/rdc.csystem2virtual:/virtualsystem/wdog_imx.c1PARENT-5-PROJECT_LOC/platform/drivers/src/wdog_imx.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.c1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.h1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hboard2virtual:/virtualboard/pin_mux.c1PARENT-3-PROJECT_LOC/pin_mux.cboard2virtual:/virtualboard/pin_mux.h1PARENT-3-PROJECT_LOC/pin_mux.hboard2virtual:/virtualboard/board.c1PARENT-3-PROJECT_LOC/board.cboard2virtual:/virtualboard/board.h1PARENT-3-PROJECT_LOC/board.hboard2virtual:/virtualboard/clock_freq.c1PARENT-3-PROJECT_LOC/clock_freq.cboard2virtual:/virtualboard/clock_freq.h1PARENT-3-PROJECT_LOC/clock_freq.hboard2virtual:/virtualboard/hardware_init.c1PARENT-1-PROJECT_LOC/hardware_init.csource2virtual:/virtualsource/main.c1PARENT-1-PROJECT_LOC/main.cdriver2virtual:/virtualdriver/adc_imx7d.c1PARENT-5-PROJECT_LOC/platform/drivers/src/adc_imx7d.cdriver2virtual:/virtualdriver/adc_imx7d.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/adc_imx7d.hdriver2virtual:/virtualdriver/uart_imx.c1PARENT-5-PROJECT_LOC/platform/drivers/src/uart_imx.cdriver2virtual:/virtualdriver/uart_imx.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/uart_imx.h + + + diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/ds5/adc_imx7d_example.wsd b/examples/imx7d_val_m4/driver_examples/adc_imx7d/ds5/adc_imx7d_example.wsd new file mode 100644 index 0000000..7de2282 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/ds5/adc_imx7d_example.wsd @@ -0,0 +1,9 @@ + + + + adc_imx7d_example_imx7d_val_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/ds5/makedir.bat b/examples/imx7d_val_m4/driver_examples/adc_imx7d/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/hardware_init.c b/examples/imx7d_val_m4/driver_examples/adc_imx7d/hardware_init.c new file mode 100644 index 0000000..52fcabc --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/hardware_init.c @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "board.h" +#include "pin_mux.h" + +void hardware_init(void) +{ + /* Board specific RDC settings */ + BOARD_RdcInit(); + + /* Board specific clock settings */ + BOARD_ClockInit(); + + /* initialize debug uart */ + dbg_uart_init(); + + /* In this example, we need to grasp ADC1 module exclusively */ + RDC_SetPdapAccess(RDC, BOARD_ADC_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false); + + /* Enable ADC clock */ + CCM_ControlGate(CCM, BOARD_ADC_CCM_CCGR, ccmClockNeededRunWait); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.ewd b/examples/imx7d_val_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.ewd @@ -0,0 +1,9419 @@ + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Ram Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.ewp b/examples/imx7d_val_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.ewp new file mode 100644 index 0000000..3e84c94 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.ewp @@ -0,0 +1,1891 @@ + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + + + + +startup$PROJ_DIR$/../../../../../platform/devices/MCIMX7D/startup/iar/startup_MCIMX7D_M4.s$PROJ_DIR$/../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c$PROJ_DIR$/../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hutilities$PROJ_DIR$/../../../../../platform/utilities/src/debug_console_imx.c$PROJ_DIR$/../../../../../platform/utilities/inc/debug_console_imx.h$PROJ_DIR$/../../../../../platform/utilities/src/print_scan.c$PROJ_DIR$/../../../../../platform/utilities/src/print_scan.hsystem$PROJ_DIR$/../../../../../platform/drivers/inc/ccm_analog_imx7d.h$PROJ_DIR$/../../../../../platform/drivers/inc/ccm_imx7d.h$PROJ_DIR$/../../../../../platform/drivers/inc/rdc.h$PROJ_DIR$/../../../../../platform/drivers/inc/rdc_defs_imx7d.h$PROJ_DIR$/../../../../../platform/drivers/inc/wdog_imx.h$PROJ_DIR$/../../../../../platform/drivers/src/ccm_analog_imx7d.c$PROJ_DIR$/../../../../../platform/drivers/src/ccm_imx7d.c$PROJ_DIR$/../../../../../platform/drivers/src/rdc.c$PROJ_DIR$/../../../../../platform/drivers/src/wdog_imx.cboard$PROJ_DIR$/../../../pin_mux.c$PROJ_DIR$/../../../pin_mux.h$PROJ_DIR$/../../../board.c$PROJ_DIR$/../../../board.h$PROJ_DIR$/../../../clock_freq.c$PROJ_DIR$/../../../clock_freq.h$PROJ_DIR$/../hardware_init.csource$PROJ_DIR$/../main.cdriver$PROJ_DIR$/../../../../../platform/drivers/src/adc_imx7d.c$PROJ_DIR$/../../../../../platform/drivers/inc/adc_imx7d.h$PROJ_DIR$/../../../../../platform/drivers/src/uart_imx.c$PROJ_DIR$/../../../../../platform/drivers/inc/uart_imx.h diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.eww b/examples/imx7d_val_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.eww new file mode 100644 index 0000000..b9ee8e1 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.eww @@ -0,0 +1,4 @@ + + +alladc_imx7d_exampleReleaseadc_imx7d_exampleDebugReleaseadc_imx7d_exampleReleaseDebugadc_imx7d_exampleDebug +$WS_DIR$/adc_imx7d_example.ewp diff --git a/examples/imx7d_val_m4/driver_examples/adc_imx7d/main.c b/examples/imx7d_val_m4/driver_examples/adc_imx7d/main.c new file mode 100644 index 0000000..42bb2e1 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/adc_imx7d/main.c @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include "adc_imx7d.h" +#include "debug_console_imx.h" +#include "board.h" + +int main(void) +{ + adc_init_config_t adcConfig = { + .sampleRate = 2000, + // For i.MX7D this value should always be set to true. + .levelShifterEnable = true + }; + + adc_logic_ch_init_config_t adcChannelConfig = { + .inputChannel = BOARD_ADC_INPUT_CHANNEL, + .coutinuousEnable = true, + .convertRate = 1, + .averageEnable = true, + .averageNumber = adcAvgNum32 + }; + + // Initialize board specified hardware. + hardware_init(); + + PRINTF("\n-------------- ADC imx7d driver example --------------\n\n\r"); + PRINTF("This example demonstrates usage of ADC driver on i.MX processor.\n\r"); + PRINTF("It Continuous convert Analog Input, and print the result to terminal \n\r"); + + // Initialize ADC module. + ADC_Init(BOARD_ADC_BASEADDR, &adcConfig); + + // Enable Convert finish interrupt on Logic Channel A + ADC_SetIntSigCmd(BOARD_ADC_BASEADDR, adcIntConvertChA, true); + ADC_SetIntCmd(BOARD_ADC_BASEADDR, adcIntConvertChA, true); + + /* Set ADC Interrupt priority */ + NVIC_SetPriority(BOARD_ADC_IRQ_NUM, 3); + + /* Call core API to enable the IRQ. */ + NVIC_EnableIRQ(BOARD_ADC_IRQ_NUM); + + // Initialize ADC Logic Channel A module. + ADC_LogicChInit(BOARD_ADC_BASEADDR, adcLogicChA, &adcChannelConfig); + + // Start Continuous Conversion on Logic Channel A. + ADC_SetConvertCmd(BOARD_ADC_BASEADDR, adcLogicChA, true); + + while(1); +} + +void BOARD_ADC_HANDLER(void) +{ + float voltage; + ADC_ClearStatusFlag(BOARD_ADC_BASEADDR, adcStatusConvertChA); + voltage = (1.8 * ADC_GetConvertResult(BOARD_ADC_BASEADDR, adcLogicChA))/0xFFF; + PRINTF("Current analog value: %3.2fv\n\r", voltage); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/CMakeLists.txt b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/CMakeLists.txt new file mode 100644 index 0000000..15fb520 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/CMakeLists.txt @@ -0,0 +1,132 @@ +INCLUDE(CMakeForceCompiler) + +# CROSS COMPILER SETTING +SET(CMAKE_SYSTEM_NAME Generic) +CMAKE_MINIMUM_REQUIRED (VERSION 2.6) + +# THE VERSION NUMBER +SET (Tutorial_VERSION_MAJOR 1) +SET (Tutorial_VERSION_MINOR 0) + +# ENABLE ASM +ENABLE_LANGUAGE(ASM) + +SET(CMAKE_STATIC_LIBRARY_PREFIX) +SET(CMAKE_STATIC_LIBRARY_SUFFIX) + +SET(CMAKE_EXECUTABLE_LIBRARY_PREFIX) +SET(CMAKE_EXECUTABLE_LIBRARY_SUFFIX) + + +# CURRENT DIRECTORY +SET(ProjDirPath ${CMAKE_CURRENT_SOURCE_DIR}) + +# DEBUG LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -T${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# RELEASE LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -T${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# DEBUG ASM FLAGS +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG C FLAGS +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# RELEASE ASM FLAGS +SET(CMAKE_ASM_FLAGS_RELEASE "${CMAKE_ASM_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE C FLAGS +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# ASM MACRO +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -D__DEBUG") + +# C MACRO +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__DEBUG") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCPU_IMX7D_M4") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D__NDEBUG") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DCPU_IMX7D_M4") + +# CXX MACRO + +# INCLUDE_DIRECTORIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../..) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../..) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(ecspi_interrupt_master_example + "${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../../../platform/utilities/src/debug_console_imx.c" + "${ProjDirPath}/../../../../../../../platform/utilities/inc/debug_console_imx.h" + "${ProjDirPath}/../../../../../../../platform/utilities/src/print_scan.c" + "${ProjDirPath}/../../../../../../../platform/utilities/src/print_scan.h" + "${ProjDirPath}/../../../../../../../platform/drivers/inc/ccm_analog_imx7d.h" + "${ProjDirPath}/../../../../../../../platform/drivers/inc/ccm_imx7d.h" + "${ProjDirPath}/../../../../../../../platform/drivers/inc/rdc.h" + "${ProjDirPath}/../../../../../../../platform/drivers/inc/rdc_defs_imx7d.h" + "${ProjDirPath}/../../../../../../../platform/drivers/inc/wdog_imx.h" + "${ProjDirPath}/../../../../../../../platform/drivers/src/ccm_analog_imx7d.c" + "${ProjDirPath}/../../../../../../../platform/drivers/src/ccm_imx7d.c" + "${ProjDirPath}/../../../../../../../platform/drivers/src/rdc.c" + "${ProjDirPath}/../../../../../../../platform/drivers/src/wdog_imx.c" + "${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c" + "${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.h" + "${ProjDirPath}/../../../../../pin_mux.c" + "${ProjDirPath}/../../../../../pin_mux.h" + "${ProjDirPath}/../../../../../board.c" + "${ProjDirPath}/../../../../../board.h" + "${ProjDirPath}/../../../../../clock_freq.c" + "${ProjDirPath}/../../../../../clock_freq.h" + "${ProjDirPath}/../hardware_init.c" + "${ProjDirPath}/../main.c" + "${ProjDirPath}/../../../../../../../platform/drivers/src/ecspi.c" + "${ProjDirPath}/../../../../../../../platform/drivers/inc/ecspi.h" + "${ProjDirPath}/../../../../../../../platform/drivers/src/uart_imx.c" + "${ProjDirPath}/../../../../../../../platform/drivers/inc/uart_imx.h" +) +SET_TARGET_PROPERTIES(ecspi_interrupt_master_example PROPERTIES OUTPUT_NAME "ecspi_interrupt_master_example.elf") + +TARGET_LINK_LIBRARIES(ecspi_interrupt_master_example -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(ecspi_interrupt_master_example m) +TARGET_LINK_LIBRARIES(ecspi_interrupt_master_example c) +TARGET_LINK_LIBRARIES(ecspi_interrupt_master_example gcc) +TARGET_LINK_LIBRARIES(ecspi_interrupt_master_example nosys) +TARGET_LINK_LIBRARIES(ecspi_interrupt_master_example -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/ecspi_interrupt_master_example.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/ecspi_interrupt_master_example.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET ecspi_interrupt_master_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/ecspi_interrupt_master_example.elf ${EXECUTABLE_OUTPUT_PATH}/ecspi_interrupt_master_example.hex) +ADD_CUSTOM_COMMAND(TARGET ecspi_interrupt_master_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/ecspi_interrupt_master_example.elf ${EXECUTABLE_OUTPUT_PATH}/ecspi_interrupt_master_example.bin) diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_all.bat b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_all.bat new file mode 100755 index 0000000..1939438 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_all.bat @@ -0,0 +1,5 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_all.sh b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_all.sh new file mode 100755 index 0000000..8c5f621 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_all.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_debug.bat b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_debug.bat new file mode 100755 index 0000000..4950fc9 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_debug.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_debug.sh b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_debug.sh new file mode 100755 index 0000000..a3a7820 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_debug.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_release.bat b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_release.bat new file mode 100755 index 0000000..9ec4b80 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_release.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_release.sh b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_release.sh new file mode 100755 index 0000000..204a7a1 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/build_release.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/clean.bat b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/clean.bat @@ -0,0 +1,3 @@ +RD /s /Q Debug Release CMakeFiles +DEL /s /Q /F Makefile cmake_install.cmake CMakeCache.txt +pause diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/clean.sh b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/armgcc/clean.sh @@ -0,0 +1,3 @@ +#!/bin/sh +rm -rf debug release CMakeFiles +rm -rf Makefile cmake_install.cmake CMakeCache.txt diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/ds5/.cproject b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/ds5/.cproject new file mode 100644 index 0000000..9730f32 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/ds5/.project b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/ds5/.project new file mode 100644 index 0000000..4007a1a --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/ds5/.project @@ -0,0 +1,86 @@ + + + ecspi_interrupt_master_example_imx7d_val_m4 + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.autoBuildTarget + all + + + org.eclipse.cdt.make.core.buildArguments + + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.buildLocation + + + + org.eclipse.cdt.make.core.cleanBuildTarget + clean + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.fullBuildTarget + all + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + startup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-7-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sutilities2virtual:/virtualutilities/debug_console_imx.c1PARENT-7-PROJECT_LOC/platform/utilities/src/debug_console_imx.cutilities2virtual:/virtualutilities/debug_console_imx.h1PARENT-7-PROJECT_LOC/platform/utilities/inc/debug_console_imx.hutilities2virtual:/virtualutilities/print_scan.c1PARENT-7-PROJECT_LOC/platform/utilities/src/print_scan.cutilities2virtual:/virtualutilities/print_scan.h1PARENT-7-PROJECT_LOC/platform/utilities/src/print_scan.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.h1PARENT-7-PROJECT_LOC/platform/drivers/inc/ccm_analog_imx7d.hsystem2virtual:/virtualsystem/ccm_imx7d.h1PARENT-7-PROJECT_LOC/platform/drivers/inc/ccm_imx7d.hsystem2virtual:/virtualsystem/rdc.h1PARENT-7-PROJECT_LOC/platform/drivers/inc/rdc.hsystem2virtual:/virtualsystem/rdc_defs_imx7d.h1PARENT-7-PROJECT_LOC/platform/drivers/inc/rdc_defs_imx7d.hsystem2virtual:/virtualsystem/wdog_imx.h1PARENT-7-PROJECT_LOC/platform/drivers/inc/wdog_imx.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.c1PARENT-7-PROJECT_LOC/platform/drivers/src/ccm_analog_imx7d.csystem2virtual:/virtualsystem/ccm_imx7d.c1PARENT-7-PROJECT_LOC/platform/drivers/src/ccm_imx7d.csystem2virtual:/virtualsystem/rdc.c1PARENT-7-PROJECT_LOC/platform/drivers/src/rdc.csystem2virtual:/virtualsystem/wdog_imx.c1PARENT-7-PROJECT_LOC/platform/drivers/src/wdog_imx.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.c1PARENT-7-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.h1PARENT-7-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hboard2virtual:/virtualboard/pin_mux.c1PARENT-5-PROJECT_LOC/pin_mux.cboard2virtual:/virtualboard/pin_mux.h1PARENT-5-PROJECT_LOC/pin_mux.hboard2virtual:/virtualboard/board.c1PARENT-5-PROJECT_LOC/board.cboard2virtual:/virtualboard/board.h1PARENT-5-PROJECT_LOC/board.hboard2virtual:/virtualboard/clock_freq.c1PARENT-5-PROJECT_LOC/clock_freq.cboard2virtual:/virtualboard/clock_freq.h1PARENT-5-PROJECT_LOC/clock_freq.hboard2virtual:/virtualboard/hardware_init.c1PARENT-1-PROJECT_LOC/hardware_init.csource2virtual:/virtualsource/main.c1PARENT-1-PROJECT_LOC/main.cdriver2virtual:/virtualdriver/ecspi.c1PARENT-7-PROJECT_LOC/platform/drivers/src/ecspi.cdriver2virtual:/virtualdriver/ecspi.h1PARENT-7-PROJECT_LOC/platform/drivers/inc/ecspi.hdriver2virtual:/virtualdriver/uart_imx.c1PARENT-7-PROJECT_LOC/platform/drivers/src/uart_imx.cdriver2virtual:/virtualdriver/uart_imx.h1PARENT-7-PROJECT_LOC/platform/drivers/inc/uart_imx.h + + + diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/ds5/ecspi_interrupt_master_example.wsd b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/ds5/ecspi_interrupt_master_example.wsd new file mode 100644 index 0000000..0e7677e --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/ds5/ecspi_interrupt_master_example.wsd @@ -0,0 +1,9 @@ + + + + ecspi_interrupt_master_example_imx7d_val_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/ds5/makedir.bat b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/hardware_init.c b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/hardware_init.c new file mode 100644 index 0000000..8916b5b --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/hardware_init.c @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "board.h" +#include "pin_mux.h" + +void hardware_init(void) +{ + /* Board specific RDC settings */ + BOARD_RdcInit(); + /* Board specific clock settings */ + BOARD_ClockInit(); + /* initialize debug uart */ + dbg_uart_init(); + + /* RDC ECSPI */ + RDC_SetPdapAccess(RDC, BOARD_ECSPI_MASTER_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false); + /* Select board ecspi clock derived from OSC clock(24M) */ + CCM_UpdateRoot(CCM, BOARD_ECSPI_MASTER_CCM_ROOT, ccmRootmuxEcspiOsc24m, 0, 0); + /* Enable ecspi clock gate */ + CCM_EnableRoot(CCM, BOARD_ECSPI_MASTER_CCM_ROOT); + CCM_ControlGate(CCM, BOARD_ECSPI_MASTER_CCM_CCGR, ccmClockNeededRunWait); + /* Configure ecspi pin IOMUX */ + configure_ecspi_pins(BOARD_ECSPI_MASTER_BASEADDR); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/iar/ecspi_interrupt_master_example.ewd b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/iar/ecspi_interrupt_master_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/iar/ecspi_interrupt_master_example.ewd @@ -0,0 +1,9419 @@ + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Ram Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/iar/ecspi_interrupt_master_example.ewp b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/iar/ecspi_interrupt_master_example.ewp new file mode 100644 index 0000000..fceb995 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/iar/ecspi_interrupt_master_example.ewp @@ -0,0 +1,1891 @@ + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + + + + +startup$PROJ_DIR$/../../../../../../../platform/devices/MCIMX7D/startup/iar/startup_MCIMX7D_M4.s$PROJ_DIR$/../../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c$PROJ_DIR$/../../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hutilities$PROJ_DIR$/../../../../../../../platform/utilities/src/debug_console_imx.c$PROJ_DIR$/../../../../../../../platform/utilities/inc/debug_console_imx.h$PROJ_DIR$/../../../../../../../platform/utilities/src/print_scan.c$PROJ_DIR$/../../../../../../../platform/utilities/src/print_scan.hsystem$PROJ_DIR$/../../../../../../../platform/drivers/inc/ccm_analog_imx7d.h$PROJ_DIR$/../../../../../../../platform/drivers/inc/ccm_imx7d.h$PROJ_DIR$/../../../../../../../platform/drivers/inc/rdc.h$PROJ_DIR$/../../../../../../../platform/drivers/inc/rdc_defs_imx7d.h$PROJ_DIR$/../../../../../../../platform/drivers/inc/wdog_imx.h$PROJ_DIR$/../../../../../../../platform/drivers/src/ccm_analog_imx7d.c$PROJ_DIR$/../../../../../../../platform/drivers/src/ccm_imx7d.c$PROJ_DIR$/../../../../../../../platform/drivers/src/rdc.c$PROJ_DIR$/../../../../../../../platform/drivers/src/wdog_imx.cboard$PROJ_DIR$/../../../../../pin_mux.c$PROJ_DIR$/../../../../../pin_mux.h$PROJ_DIR$/../../../../../board.c$PROJ_DIR$/../../../../../board.h$PROJ_DIR$/../../../../../clock_freq.c$PROJ_DIR$/../../../../../clock_freq.h$PROJ_DIR$/../hardware_init.csource$PROJ_DIR$/../main.cdriver$PROJ_DIR$/../../../../../../../platform/drivers/src/ecspi.c$PROJ_DIR$/../../../../../../../platform/drivers/inc/ecspi.h$PROJ_DIR$/../../../../../../../platform/drivers/src/uart_imx.c$PROJ_DIR$/../../../../../../../platform/drivers/inc/uart_imx.h diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/iar/ecspi_interrupt_master_example.eww b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/iar/ecspi_interrupt_master_example.eww new file mode 100644 index 0000000..4a1c9e5 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/iar/ecspi_interrupt_master_example.eww @@ -0,0 +1,4 @@ + + +allecspi_interrupt_master_exampleReleaseecspi_interrupt_master_exampleDebugReleaseecspi_interrupt_master_exampleReleaseDebugecspi_interrupt_master_exampleDebug +$WS_DIR$/ecspi_interrupt_master_example.ewp diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/main.c b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/main.c new file mode 100644 index 0000000..67c425d --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/master/main.c @@ -0,0 +1,288 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include "board.h" +#include "uart_imx.h" +#include "debug_console_imx.h" +#include "ecspi.h" +#include "clock_freq.h" + +/* define ECSPI master mode parameters configuration. */ +#define ECSPI_MASTER_BURSTLENGTH (7) +#define ECSPI_MASTER_STARTMODE (0) + +typedef struct EcspiState +{ + uint8_t* txBuffPtr; /* Pointer to ECSPI Transmission Buffer */ + uint8_t txSize; /* The remaining number of bytes to be transmitted */ + uint8_t* rxBuffPtr; /* Pointer to ECSPI Receive Buffer */ + uint8_t rxSize; /* The remaining number of bytes to be transmitted */ + volatile bool isBusy; /* True if there is a acctive transfer */ +} ecspi_state_t; + +/* ECSPI runtime state structure */ +static ecspi_state_t ecspiState; + +/* ECSPI master configure */ +static void ECSPI_MasterConfig(ecspi_init_t* initConfig); +/* ECSPI data transfer */ +static bool ECSPI_MasterTransfer(uint8_t* txBuffer, uint8_t* rxBuffer, uint32_t transferSize); +static bool ECSPI_MasterReceiveBurst(void); +static bool ECSPI_MasterTransmitBurst(void); +/* ECSPI transfer status */ +static bool ECSPI_MasterGetTransferStatus(void); + +/* Transfered data */ +static uint8_t txData[1] = {0}; +static uint8_t rxData[1] = {0}; + +int main(void) +{ + uint8_t control_char; + uint8_t i; + + ecspi_init_t ecspiMasterInitConfig = { + .baudRate = 500000, + .mode = ecspiMasterMode, + .burstLength = ECSPI_MASTER_BURSTLENGTH, + .channelSelect = BOARD_ECSPI_MASTER_CHANNEL, + .clockPhase = ecspiClockPhaseSecondEdge, + .clockPolarity = ecspiClockPolarityActiveHigh, + .ecspiAutoStart = ECSPI_MASTER_STARTMODE + }; + + /* Hardware initialiize, include RDC, CLOCK, IOMUX, ENABLE MODULE */ + hardware_init(); + + /* Update clock frequency of this module */ + ecspiMasterInitConfig.clockRate = get_ecspi_clock_freq(BOARD_ECSPI_MASTER_BASEADDR); + + PRINTF("\n-------------- ECSPI master driver example --------------\n\n\r"); + PRINTF("This example application demonstrates usage of SPI driver in master mode.\n\r"); + PRINTF("It transfers data to/from remote MCU in SPI slave mode.\n\r"); + + /* Ecspi module initialize, include configure parameters */ + ECSPI_MasterConfig(&ecspiMasterInitConfig); + + /* Wait slave ready, then press 's' to start communication. */ + while(true) + { + PRINTF("Press \"s\" when spi slave is ready.\n\r"); + control_char = GETCHAR(); + if((control_char == 's') || (control_char == 'S')) + break; + } + + /* Send 1~20 to slave and receive data from slave */ + for(i = 0; i < 20; i++) + { + txData[0]++; + ECSPI_MasterTransfer((uint8_t*)txData, (uint8_t*)rxData, 1); + while(ECSPI_MasterGetTransferStatus()); + PRINTF("MASTER: Transmited data: %d \n\r", txData[0]); + PRINTF(" : Received data: %d \n\n\r", rxData[0]); + } + while(1); +} + +/****************************************************************************** +* +* Function Name: ECSPI_MasterTransmitBurst +* Comments: Fill the TXFIFO. +* +******************************************************************************/ +static bool ECSPI_MasterTransmitBurst(void) +{ + uint8_t bytes; + uint32_t data; + uint8_t i; + + /* Fill the TXFIFO */ + while((ecspiState.txSize > 0) && (ECSPI_GetStatusFlag(BOARD_ECSPI_MASTER_BASEADDR, ecspiFlagTxfifoFull) == 0)) + { + bytes = ecspiState.txSize & 0x3; /* first get unaligned part trasmitted */ + bytes = bytes ? bytes : 4; /* if aligned, then must be 4 */ + + if(!(ecspiState.txBuffPtr)) + { + data = 0xFFFFFFFF; /* half-duplex receive data */ + } + else + { + data = 0; + for(i = 0; i < bytes; i++) + data = (data << 8) | *(ecspiState.txBuffPtr)++; + } + + ECSPI_SendData(BOARD_ECSPI_MASTER_BASEADDR, data); + ecspiState.txSize -= bytes; + ecspiState.rxSize += bytes; + } + /* start transmission */ + ECSPI_StartBurst(BOARD_ECSPI_MASTER_BASEADDR); + /* set transfer flag */ + ecspiState.isBusy = true; + return true; +} + +/****************************************************************************** +* +* Function Name: ECSPI_MasterReceiveBurst +* Comments: Receive data from RXFIFO +* +******************************************************************************/ +static bool ECSPI_MasterReceiveBurst(void) +{ + uint32_t data; + uint32_t bytes; + uint32_t i; + + while ((ecspiState.rxSize > 0) && (ECSPI_GetStatusFlag(BOARD_ECSPI_MASTER_BASEADDR, ecspiFlagRxfifoReady) != 0)) + { + data = ECSPI_ReceiveData(BOARD_ECSPI_MASTER_BASEADDR); /* read data from register */ + bytes = ecspiState.rxSize & 0x3; /* first get unaligned part received */ + bytes = bytes ? bytes : 4; /* if aligned, then must be 4 */ + + if(ecspiState.rxBuffPtr) /* not half-duplex transmit */ + { + for(i = bytes; i > 0; i--) + { + *(ecspiState.rxBuffPtr + i - 1) = data & 0xFF; + data >>= 8; + } + ecspiState.rxBuffPtr += bytes; + } + ecspiState.rxSize -= bytes; + } + return true; +} + +/****************************************************************************** +* +* Function Name: ECSPI_MasterTransfer +* Comments: Transmit and Receive an amount of data in no-blocking mode with +* interrupt. +* +******************************************************************************/ +static bool ECSPI_MasterTransfer(uint8_t* txBuffer, uint8_t* rxBuffer, uint32_t transferSize) +{ + uint32_t len; + + if((ecspiState.isBusy) || (transferSize == 0)) + { + return false; + } + + /* Update the burst length to real size */ + len = (uint32_t)(transferSize * 8 - 1); + ECSPI_SetBurstLength(BOARD_ECSPI_MASTER_BASEADDR, len); + + /* Configure the transfer */ + ecspiState.txBuffPtr = txBuffer; + ecspiState.rxBuffPtr = rxBuffer; + ecspiState.txSize = transferSize; + ecspiState.rxSize = 0; + + /* Fill the TXFIFO */ + ECSPI_MasterTransmitBurst(); + /* Enable interrupts */ + ECSPI_SetIntCmd(BOARD_ECSPI_MASTER_BASEADDR, ecspiFlagTxfifoEmpty, true); + return true; +} + +/****************************************************************************** +* +* Function Name: ECSPI_MasterGetTransferStatus +* Comments: Get transfer status. +* +******************************************************************************/ +static bool ECSPI_MasterGetTransferStatus(void) +{ + return ecspiState.isBusy; +} + +/****************************************************************************** +* +* Function Name: ECSPI_MasterConfig +* Comments: ECSPI module initialize +* +******************************************************************************/ +static void ECSPI_MasterConfig(ecspi_init_t* initConfig) +{ + /* Initialize ECSPI transfer state. */ + ecspiState.isBusy = false; + + /* Initialize ECSPI, parameter configure */ + ECSPI_Init(BOARD_ECSPI_MASTER_BASEADDR, initConfig); + + /* Call core API to enable the IRQ. */ + NVIC_EnableIRQ(BOARD_ECSPI_MASTER_IRQ_NUM); +} + +/****************************************************************************** +* +* Function Name: BOARD_ECSPI_MASTER_HANDLER +* Comments: The interrupt service routine triggered by ECSPI interrupt +* +******************************************************************************/ +void BOARD_ECSPI_MASTER_HANDLER(void) +{ + /* Receive data from RXFIFO */ + ECSPI_MasterReceiveBurst(); + + /* Push data left */ + if(ecspiState.txSize) + { + ECSPI_MasterTransmitBurst(); + return; + } + + /* No data left to push, but still waiting for rx data, enable receive data available interrupt. */ + if(ecspiState.rxSize) + { + ECSPI_SetIntCmd(BOARD_ECSPI_MASTER_BASEADDR, ecspiFlagRxfifoReady, true); + return; + } + + /* Disable interrupt */ + ECSPI_SetIntCmd(BOARD_ECSPI_MASTER_BASEADDR, ecspiFlagTxfifoEmpty, false); + ECSPI_SetIntCmd(BOARD_ECSPI_MASTER_BASEADDR, ecspiFlagRxfifoReady, false); + + /* Clear the status */ + ECSPI_ClearStatusFlag(BOARD_ECSPI_MASTER_BASEADDR, ecspiFlagTxfifoTc); + ECSPI_ClearStatusFlag(BOARD_ECSPI_MASTER_BASEADDR, ecspiFlagRxfifoOverflow); + + ecspiState.isBusy = false; +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/CMakeLists.txt b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/CMakeLists.txt new file mode 100644 index 0000000..49aaa01 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/CMakeLists.txt @@ -0,0 +1,132 @@ +INCLUDE(CMakeForceCompiler) + +# CROSS COMPILER SETTING +SET(CMAKE_SYSTEM_NAME Generic) +CMAKE_MINIMUM_REQUIRED (VERSION 2.6) + +# THE VERSION NUMBER +SET (Tutorial_VERSION_MAJOR 1) +SET (Tutorial_VERSION_MINOR 0) + +# ENABLE ASM +ENABLE_LANGUAGE(ASM) + +SET(CMAKE_STATIC_LIBRARY_PREFIX) +SET(CMAKE_STATIC_LIBRARY_SUFFIX) + +SET(CMAKE_EXECUTABLE_LIBRARY_PREFIX) +SET(CMAKE_EXECUTABLE_LIBRARY_SUFFIX) + + +# CURRENT DIRECTORY +SET(ProjDirPath ${CMAKE_CURRENT_SOURCE_DIR}) + +# DEBUG LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -T${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# RELEASE LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -T${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# DEBUG ASM FLAGS +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG C FLAGS +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# RELEASE ASM FLAGS +SET(CMAKE_ASM_FLAGS_RELEASE "${CMAKE_ASM_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE C FLAGS +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# ASM MACRO +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -D__DEBUG") + +# C MACRO +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__DEBUG") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCPU_IMX7D_M4") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D__NDEBUG") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DCPU_IMX7D_M4") + +# CXX MACRO + +# INCLUDE_DIRECTORIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../..) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../..) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(ecspi_interrupt_slave_example + "${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../../../platform/utilities/src/debug_console_imx.c" + "${ProjDirPath}/../../../../../../../platform/utilities/inc/debug_console_imx.h" + "${ProjDirPath}/../../../../../../../platform/utilities/src/print_scan.c" + "${ProjDirPath}/../../../../../../../platform/utilities/src/print_scan.h" + "${ProjDirPath}/../../../../../../../platform/drivers/inc/ccm_analog_imx7d.h" + "${ProjDirPath}/../../../../../../../platform/drivers/inc/ccm_imx7d.h" + "${ProjDirPath}/../../../../../../../platform/drivers/inc/rdc.h" + "${ProjDirPath}/../../../../../../../platform/drivers/inc/rdc_defs_imx7d.h" + "${ProjDirPath}/../../../../../../../platform/drivers/inc/wdog_imx.h" + "${ProjDirPath}/../../../../../../../platform/drivers/src/ccm_analog_imx7d.c" + "${ProjDirPath}/../../../../../../../platform/drivers/src/ccm_imx7d.c" + "${ProjDirPath}/../../../../../../../platform/drivers/src/rdc.c" + "${ProjDirPath}/../../../../../../../platform/drivers/src/wdog_imx.c" + "${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c" + "${ProjDirPath}/../../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.h" + "${ProjDirPath}/../../../../../pin_mux.c" + "${ProjDirPath}/../../../../../pin_mux.h" + "${ProjDirPath}/../../../../../board.c" + "${ProjDirPath}/../../../../../board.h" + "${ProjDirPath}/../../../../../clock_freq.c" + "${ProjDirPath}/../../../../../clock_freq.h" + "${ProjDirPath}/../hardware_init.c" + "${ProjDirPath}/../main.c" + "${ProjDirPath}/../../../../../../../platform/drivers/src/ecspi.c" + "${ProjDirPath}/../../../../../../../platform/drivers/inc/ecspi.h" + "${ProjDirPath}/../../../../../../../platform/drivers/src/uart_imx.c" + "${ProjDirPath}/../../../../../../../platform/drivers/inc/uart_imx.h" +) +SET_TARGET_PROPERTIES(ecspi_interrupt_slave_example PROPERTIES OUTPUT_NAME "ecspi_interrupt_slave_example.elf") + +TARGET_LINK_LIBRARIES(ecspi_interrupt_slave_example -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(ecspi_interrupt_slave_example m) +TARGET_LINK_LIBRARIES(ecspi_interrupt_slave_example c) +TARGET_LINK_LIBRARIES(ecspi_interrupt_slave_example gcc) +TARGET_LINK_LIBRARIES(ecspi_interrupt_slave_example nosys) +TARGET_LINK_LIBRARIES(ecspi_interrupt_slave_example -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/ecspi_interrupt_slave_example.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/ecspi_interrupt_slave_example.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET ecspi_interrupt_slave_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/ecspi_interrupt_slave_example.elf ${EXECUTABLE_OUTPUT_PATH}/ecspi_interrupt_slave_example.hex) +ADD_CUSTOM_COMMAND(TARGET ecspi_interrupt_slave_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/ecspi_interrupt_slave_example.elf ${EXECUTABLE_OUTPUT_PATH}/ecspi_interrupt_slave_example.bin) diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_all.bat b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_all.bat new file mode 100755 index 0000000..1939438 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_all.bat @@ -0,0 +1,5 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_all.sh b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_all.sh new file mode 100755 index 0000000..8c5f621 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_all.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_debug.bat b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_debug.bat new file mode 100755 index 0000000..4950fc9 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_debug.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_debug.sh b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_debug.sh new file mode 100755 index 0000000..a3a7820 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_debug.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_release.bat b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_release.bat new file mode 100755 index 0000000..9ec4b80 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_release.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_release.sh b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_release.sh new file mode 100755 index 0000000..204a7a1 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/build_release.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/clean.bat b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/clean.bat @@ -0,0 +1,3 @@ +RD /s /Q Debug Release CMakeFiles +DEL /s /Q /F Makefile cmake_install.cmake CMakeCache.txt +pause diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/clean.sh b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/armgcc/clean.sh @@ -0,0 +1,3 @@ +#!/bin/sh +rm -rf debug release CMakeFiles +rm -rf Makefile cmake_install.cmake CMakeCache.txt diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/ds5/.cproject b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/ds5/.cproject new file mode 100644 index 0000000..3a71220 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/ds5/.project b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/ds5/.project new file mode 100644 index 0000000..07ec55d --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/ds5/.project @@ -0,0 +1,86 @@ + + + ecspi_interrupt_slave_example_imx7d_val_m4 + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.autoBuildTarget + all + + + org.eclipse.cdt.make.core.buildArguments + + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.buildLocation + + + + org.eclipse.cdt.make.core.cleanBuildTarget + clean + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.fullBuildTarget + all + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + startup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-7-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sutilities2virtual:/virtualutilities/debug_console_imx.c1PARENT-7-PROJECT_LOC/platform/utilities/src/debug_console_imx.cutilities2virtual:/virtualutilities/debug_console_imx.h1PARENT-7-PROJECT_LOC/platform/utilities/inc/debug_console_imx.hutilities2virtual:/virtualutilities/print_scan.c1PARENT-7-PROJECT_LOC/platform/utilities/src/print_scan.cutilities2virtual:/virtualutilities/print_scan.h1PARENT-7-PROJECT_LOC/platform/utilities/src/print_scan.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.h1PARENT-7-PROJECT_LOC/platform/drivers/inc/ccm_analog_imx7d.hsystem2virtual:/virtualsystem/ccm_imx7d.h1PARENT-7-PROJECT_LOC/platform/drivers/inc/ccm_imx7d.hsystem2virtual:/virtualsystem/rdc.h1PARENT-7-PROJECT_LOC/platform/drivers/inc/rdc.hsystem2virtual:/virtualsystem/rdc_defs_imx7d.h1PARENT-7-PROJECT_LOC/platform/drivers/inc/rdc_defs_imx7d.hsystem2virtual:/virtualsystem/wdog_imx.h1PARENT-7-PROJECT_LOC/platform/drivers/inc/wdog_imx.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.c1PARENT-7-PROJECT_LOC/platform/drivers/src/ccm_analog_imx7d.csystem2virtual:/virtualsystem/ccm_imx7d.c1PARENT-7-PROJECT_LOC/platform/drivers/src/ccm_imx7d.csystem2virtual:/virtualsystem/rdc.c1PARENT-7-PROJECT_LOC/platform/drivers/src/rdc.csystem2virtual:/virtualsystem/wdog_imx.c1PARENT-7-PROJECT_LOC/platform/drivers/src/wdog_imx.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.c1PARENT-7-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.h1PARENT-7-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hboard2virtual:/virtualboard/pin_mux.c1PARENT-5-PROJECT_LOC/pin_mux.cboard2virtual:/virtualboard/pin_mux.h1PARENT-5-PROJECT_LOC/pin_mux.hboard2virtual:/virtualboard/board.c1PARENT-5-PROJECT_LOC/board.cboard2virtual:/virtualboard/board.h1PARENT-5-PROJECT_LOC/board.hboard2virtual:/virtualboard/clock_freq.c1PARENT-5-PROJECT_LOC/clock_freq.cboard2virtual:/virtualboard/clock_freq.h1PARENT-5-PROJECT_LOC/clock_freq.hboard2virtual:/virtualboard/hardware_init.c1PARENT-1-PROJECT_LOC/hardware_init.csource2virtual:/virtualsource/main.c1PARENT-1-PROJECT_LOC/main.cdriver2virtual:/virtualdriver/ecspi.c1PARENT-7-PROJECT_LOC/platform/drivers/src/ecspi.cdriver2virtual:/virtualdriver/ecspi.h1PARENT-7-PROJECT_LOC/platform/drivers/inc/ecspi.hdriver2virtual:/virtualdriver/uart_imx.c1PARENT-7-PROJECT_LOC/platform/drivers/src/uart_imx.cdriver2virtual:/virtualdriver/uart_imx.h1PARENT-7-PROJECT_LOC/platform/drivers/inc/uart_imx.h + + + diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/ds5/ecspi_interrupt_slave_example.wsd b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/ds5/ecspi_interrupt_slave_example.wsd new file mode 100644 index 0000000..66cbe61 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/ds5/ecspi_interrupt_slave_example.wsd @@ -0,0 +1,9 @@ + + + + ecspi_interrupt_slave_example_imx7d_val_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/ds5/makedir.bat b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/hardware_init.c b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/hardware_init.c new file mode 100644 index 0000000..1788b10 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/hardware_init.c @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "board.h" +#include "pin_mux.h" + +void hardware_init(void) +{ + /* Board specific RDC settings */ + BOARD_RdcInit(); + /* Board specific clock settings */ + BOARD_ClockInit(); + /* initialize debug uart */ + dbg_uart_init(); + + /* RDC ECSPI */ + RDC_SetPdapAccess(RDC, BOARD_ECSPI_SLAVE_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false); + /* Select board ecspi clock derived from OSC clock(24M) */ + CCM_UpdateRoot(CCM, BOARD_ECSPI_SLAVE_CCM_ROOT, ccmRootmuxEcspiOsc24m, 0, 0); + /* Enable ecspi clock gate */ + CCM_EnableRoot(CCM, BOARD_ECSPI_SLAVE_CCM_ROOT); + CCM_ControlGate(CCM, BOARD_ECSPI_SLAVE_CCM_CCGR, ccmClockNeededRunWait); + /* Configure ecspi pin IOMUX */ + configure_ecspi_slave_pins(BOARD_ECSPI_SLAVE_BASEADDR); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/iar/ecspi_interrupt_slave_example.ewd b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/iar/ecspi_interrupt_slave_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/iar/ecspi_interrupt_slave_example.ewd @@ -0,0 +1,9419 @@ + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Ram Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/iar/ecspi_interrupt_slave_example.ewp b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/iar/ecspi_interrupt_slave_example.ewp new file mode 100644 index 0000000..a57b5a7 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/iar/ecspi_interrupt_slave_example.ewp @@ -0,0 +1,1891 @@ + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + + + + +startup$PROJ_DIR$/../../../../../../../platform/devices/MCIMX7D/startup/iar/startup_MCIMX7D_M4.s$PROJ_DIR$/../../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c$PROJ_DIR$/../../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hutilities$PROJ_DIR$/../../../../../../../platform/utilities/src/debug_console_imx.c$PROJ_DIR$/../../../../../../../platform/utilities/inc/debug_console_imx.h$PROJ_DIR$/../../../../../../../platform/utilities/src/print_scan.c$PROJ_DIR$/../../../../../../../platform/utilities/src/print_scan.hsystem$PROJ_DIR$/../../../../../../../platform/drivers/inc/ccm_analog_imx7d.h$PROJ_DIR$/../../../../../../../platform/drivers/inc/ccm_imx7d.h$PROJ_DIR$/../../../../../../../platform/drivers/inc/rdc.h$PROJ_DIR$/../../../../../../../platform/drivers/inc/rdc_defs_imx7d.h$PROJ_DIR$/../../../../../../../platform/drivers/inc/wdog_imx.h$PROJ_DIR$/../../../../../../../platform/drivers/src/ccm_analog_imx7d.c$PROJ_DIR$/../../../../../../../platform/drivers/src/ccm_imx7d.c$PROJ_DIR$/../../../../../../../platform/drivers/src/rdc.c$PROJ_DIR$/../../../../../../../platform/drivers/src/wdog_imx.cboard$PROJ_DIR$/../../../../../pin_mux.c$PROJ_DIR$/../../../../../pin_mux.h$PROJ_DIR$/../../../../../board.c$PROJ_DIR$/../../../../../board.h$PROJ_DIR$/../../../../../clock_freq.c$PROJ_DIR$/../../../../../clock_freq.h$PROJ_DIR$/../hardware_init.csource$PROJ_DIR$/../main.cdriver$PROJ_DIR$/../../../../../../../platform/drivers/src/ecspi.c$PROJ_DIR$/../../../../../../../platform/drivers/inc/ecspi.h$PROJ_DIR$/../../../../../../../platform/drivers/src/uart_imx.c$PROJ_DIR$/../../../../../../../platform/drivers/inc/uart_imx.h diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/iar/ecspi_interrupt_slave_example.eww b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/iar/ecspi_interrupt_slave_example.eww new file mode 100644 index 0000000..551abea --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/iar/ecspi_interrupt_slave_example.eww @@ -0,0 +1,4 @@ + + +allecspi_interrupt_slave_exampleReleaseecspi_interrupt_slave_exampleDebugReleaseecspi_interrupt_slave_exampleReleaseDebugecspi_interrupt_slave_exampleDebug +$WS_DIR$/ecspi_interrupt_slave_example.ewp diff --git a/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/main.c b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/main.c new file mode 100644 index 0000000..d81a3c4 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/ecspi/ecspi_interrupt/slave/main.c @@ -0,0 +1,175 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include "board.h" +#include "uart_imx.h" +#include "debug_console_imx.h" +#include "ecspi.h" + +/* define ECSPI slave mode burst length */ +#define ECSPI_SLAVE_BURSTLENGTH (7) +#define FIRST_DATA 0xFF + +/* ECSPI module slave mode configure */ +static void ECSPI_SlaveConfig(ecspi_init_t* initConfig); +/* ECSPI slave mode transfer Status */ +static bool ECSPI_SlaveGetTransferStatus(void); + +static volatile uint8_t txData; +static volatile uint8_t rxData; +static uint8_t txBuffer[20]; +static uint8_t rxBuffer[20]; +static volatile bool isBusy; + +int main(void) +{ + uint8_t i; + + ecspi_init_t ecspiSlaveInitConfig = { + .clockRate = 0, + .baudRate = 0, + .mode = ecspiSlaveMode, + .burstLength = ECSPI_SLAVE_BURSTLENGTH, + .channelSelect = BOARD_ECSPI_SLAVE_CHANNEL, + .clockPhase = ecspiClockPhaseSecondEdge, + .clockPolarity = ecspiClockPolarityActiveHigh, + .ecspiAutoStart = 0 + }; + + /* Hardware initialiize, include RDC, CLOCK, IOMUX, ENABLE MODULE */ + hardware_init(); + + PRINTF("\n-------------- ECSPI slave driver example --------------\n\n\r"); + PRINTF("This example application demonstrates usage of ECSPI slave driver.\n\r"); + PRINTF("It responding to master via SPI bus.\n\n\r"); + + /* Ecspi slave initialize, include configure parameters */ + txData = FIRST_DATA; + ECSPI_SlaveConfig(&ecspiSlaveInitConfig); + + PRINTF("SLAVE: Initial transmit data: %d\n\n\r", txData); + + /* Send data to master and receive data from master */ + txData = 0; + for(i = 0; i < 20; i++) + { + /* Wait for transfer */ + while(ECSPI_SlaveGetTransferStatus()); + txBuffer[i] = txData; + rxBuffer[i] = rxData; + txData = txData + 1; + /* Set transfer status */ + isBusy = true; + } + + for(i = 0; i < 20; i++) + { + PRINTF("SLAVE: Next step transmit data: %d\n\r", txBuffer[i]); + PRINTF(" : Currently received data: %d\n\n\r", rxBuffer[i]); + } + + /* Disable ecspi slave module */ + ECSPI_Disable(BOARD_ECSPI_SLAVE_BASEADDR); + while(1); +} + +/****************************************************************************** +* +* Function Name: ECSPI_SlaveGetTransferStatus +* Comments: Get Slave transfer status. +* +******************************************************************************/ +static bool ECSPI_SlaveGetTransferStatus(void) +{ + return isBusy; +} + +/****************************************************************************** +* +* Function Name: ECSPI_SlaveConfig +* Comments: ECSPI slave initialize +* +******************************************************************************/ +static void ECSPI_SlaveConfig(ecspi_init_t* initConfig) +{ + /* Initialize ECSPI, parameter configure */ + ECSPI_Init(BOARD_ECSPI_SLAVE_BASEADDR, initConfig); + + /* Move first data to tx data register to be ready for first transmition. */ + ECSPI_SendData(BOARD_ECSPI_SLAVE_BASEADDR, txData); + + /* Call core API to enable the IRQ. */ + NVIC_EnableIRQ(BOARD_ECSPI_SLAVE_IRQ_NUM); + + /* Clear ECSPI status register */ + ECSPI_ClearStatusFlag(BOARD_ECSPI_SLAVE_BASEADDR, ecspiFlagTxfifoTc); + ECSPI_ClearStatusFlag(BOARD_ECSPI_SLAVE_BASEADDR, ecspiFlagRxfifoOverflow); + + /* Enable RXFIFO Ready Interrupt.*/ + ECSPI_SetIntCmd(BOARD_ECSPI_SLAVE_BASEADDR, ecspiFlagRxfifoReady, true); + + /* Set ECSPI transfer state. */ + isBusy = true; +} + +/****************************************************************************** +* +* Function Name : BOARD_ECSPI_SLAVE_HANDLER +* Returned Value : none +* Comments : +* ECSPI slave IRQ handler. +* Copy txData to tx data register (will be send in next step) and received +* data to rxData. +* +******************************************************************************/ +void BOARD_ECSPI_SLAVE_HANDLER(void) +{ + /* Are one word or more in RX FIFO */ + if(ECSPI_GetStatusFlag(BOARD_ECSPI_SLAVE_BASEADDR, ecspiFlagRxfifoReady) != 0) + { + /* Read byte from rx data register */ + rxData = ECSPI_ReceiveData(BOARD_ECSPI_SLAVE_BASEADDR); + + /* Store tx data to tx data register for next transmition */ + ECSPI_SendData(BOARD_ECSPI_SLAVE_BASEADDR, txData); + + /* Clear the status */ + ECSPI_ClearStatusFlag(BOARD_ECSPI_SLAVE_BASEADDR, ecspiFlagTxfifoTc); + ECSPI_ClearStatusFlag(BOARD_ECSPI_SLAVE_BASEADDR, ecspiFlagRxfifoOverflow); + + /* Set transfer status */ + isBusy = false; + } +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/CMakeLists.txt b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/CMakeLists.txt new file mode 100644 index 0000000..97f64f2 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/CMakeLists.txt @@ -0,0 +1,136 @@ +INCLUDE(CMakeForceCompiler) + +# CROSS COMPILER SETTING +SET(CMAKE_SYSTEM_NAME Generic) +CMAKE_MINIMUM_REQUIRED (VERSION 2.6) + +# THE VERSION NUMBER +SET (Tutorial_VERSION_MAJOR 1) +SET (Tutorial_VERSION_MINOR 0) + +# ENABLE ASM +ENABLE_LANGUAGE(ASM) + +SET(CMAKE_STATIC_LIBRARY_PREFIX) +SET(CMAKE_STATIC_LIBRARY_SUFFIX) + +SET(CMAKE_EXECUTABLE_LIBRARY_PREFIX) +SET(CMAKE_EXECUTABLE_LIBRARY_SUFFIX) + + +# CURRENT DIRECTORY +SET(ProjDirPath ${CMAKE_CURRENT_SOURCE_DIR}) + +# DEBUG LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -T${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# RELEASE LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -T${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# DEBUG ASM FLAGS +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG C FLAGS +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# RELEASE ASM FLAGS +SET(CMAKE_ASM_FLAGS_RELEASE "${CMAKE_ASM_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE C FLAGS +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# ASM MACRO +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -D__DEBUG") + +# C MACRO +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__DEBUG") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCPU_IMX7D_M4") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D__NDEBUG") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DCPU_IMX7D_M4") + +# CXX MACRO + +# INCLUDE_DIRECTORIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(flexcan_loopback_example + "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../../platform/utilities/src/debug_console_imx.c" + "${ProjDirPath}/../../../../../../platform/utilities/inc/debug_console_imx.h" + "${ProjDirPath}/../../../../../../platform/utilities/src/print_scan.c" + "${ProjDirPath}/../../../../../../platform/utilities/src/print_scan.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/ccm_analog_imx7d.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/ccm_imx7d.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/rdc.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/rdc_defs_imx7d.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/wdog_imx.h" + "${ProjDirPath}/../../../../../../platform/drivers/src/ccm_analog_imx7d.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/ccm_imx7d.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/rdc.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/wdog_imx.c" + "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c" + "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.h" + "${ProjDirPath}/../../../../pin_mux.c" + "${ProjDirPath}/../../../../pin_mux.h" + "${ProjDirPath}/../../../../board.c" + "${ProjDirPath}/../../../../board.h" + "${ProjDirPath}/../../../../clock_freq.c" + "${ProjDirPath}/../../../../clock_freq.h" + "${ProjDirPath}/../hardware_init.c" + "${ProjDirPath}/../../../../gpio_pins.c" + "${ProjDirPath}/../../../../gpio_pins.h" + "${ProjDirPath}/../main.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/flexcan.c" + "${ProjDirPath}/../../../../../../platform/drivers/inc/flexcan.h" + "${ProjDirPath}/../../../../../../platform/drivers/src/gpt.c" + "${ProjDirPath}/../../../../../../platform/drivers/inc/gpt.h" + "${ProjDirPath}/../../../../../../platform/drivers/src/uart_imx.c" + "${ProjDirPath}/../../../../../../platform/drivers/inc/uart_imx.h" +) +SET_TARGET_PROPERTIES(flexcan_loopback_example PROPERTIES OUTPUT_NAME "flexcan_loopback_example.elf") + +TARGET_LINK_LIBRARIES(flexcan_loopback_example -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(flexcan_loopback_example m) +TARGET_LINK_LIBRARIES(flexcan_loopback_example c) +TARGET_LINK_LIBRARIES(flexcan_loopback_example gcc) +TARGET_LINK_LIBRARIES(flexcan_loopback_example nosys) +TARGET_LINK_LIBRARIES(flexcan_loopback_example -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/flexcan_loopback_example.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/flexcan_loopback_example.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET flexcan_loopback_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/flexcan_loopback_example.elf ${EXECUTABLE_OUTPUT_PATH}/flexcan_loopback_example.hex) +ADD_CUSTOM_COMMAND(TARGET flexcan_loopback_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/flexcan_loopback_example.elf ${EXECUTABLE_OUTPUT_PATH}/flexcan_loopback_example.bin) diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_all.bat b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_all.bat new file mode 100755 index 0000000..0cf721f --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_all.bat @@ -0,0 +1,5 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_all.sh b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_all.sh new file mode 100755 index 0000000..3827529 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_all.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_debug.bat b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_debug.bat new file mode 100755 index 0000000..e9ccfdd --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_debug.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_debug.sh b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_debug.sh new file mode 100755 index 0000000..effd076 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_debug.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_release.bat b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_release.bat new file mode 100755 index 0000000..0759349 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_release.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_release.sh b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_release.sh new file mode 100755 index 0000000..a12067d --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_release.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/clean.bat b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/clean.bat @@ -0,0 +1,3 @@ +RD /s /Q Debug Release CMakeFiles +DEL /s /Q /F Makefile cmake_install.cmake CMakeCache.txt +pause diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/clean.sh b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/armgcc/clean.sh @@ -0,0 +1,3 @@ +#!/bin/sh +rm -rf debug release CMakeFiles +rm -rf Makefile cmake_install.cmake CMakeCache.txt diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/ds5/.cproject b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/ds5/.cproject new file mode 100644 index 0000000..deedb71 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/ds5/.project b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/ds5/.project new file mode 100644 index 0000000..689b14f --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/ds5/.project @@ -0,0 +1,86 @@ + + + flexcan_loopback_example_imx7d_val_m4 + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.autoBuildTarget + all + + + org.eclipse.cdt.make.core.buildArguments + + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.buildLocation + + + + org.eclipse.cdt.make.core.cleanBuildTarget + clean + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.fullBuildTarget + all + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + startup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sutilities2virtual:/virtualutilities/debug_console_imx.c1PARENT-6-PROJECT_LOC/platform/utilities/src/debug_console_imx.cutilities2virtual:/virtualutilities/debug_console_imx.h1PARENT-6-PROJECT_LOC/platform/utilities/inc/debug_console_imx.hutilities2virtual:/virtualutilities/print_scan.c1PARENT-6-PROJECT_LOC/platform/utilities/src/print_scan.cutilities2virtual:/virtualutilities/print_scan.h1PARENT-6-PROJECT_LOC/platform/utilities/src/print_scan.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/ccm_analog_imx7d.hsystem2virtual:/virtualsystem/ccm_imx7d.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/ccm_imx7d.hsystem2virtual:/virtualsystem/rdc.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/rdc.hsystem2virtual:/virtualsystem/rdc_defs_imx7d.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/rdc_defs_imx7d.hsystem2virtual:/virtualsystem/wdog_imx.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/wdog_imx.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.c1PARENT-6-PROJECT_LOC/platform/drivers/src/ccm_analog_imx7d.csystem2virtual:/virtualsystem/ccm_imx7d.c1PARENT-6-PROJECT_LOC/platform/drivers/src/ccm_imx7d.csystem2virtual:/virtualsystem/rdc.c1PARENT-6-PROJECT_LOC/platform/drivers/src/rdc.csystem2virtual:/virtualsystem/wdog_imx.c1PARENT-6-PROJECT_LOC/platform/drivers/src/wdog_imx.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.c1PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.h1PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hboard2virtual:/virtualboard/pin_mux.c1PARENT-4-PROJECT_LOC/pin_mux.cboard2virtual:/virtualboard/pin_mux.h1PARENT-4-PROJECT_LOC/pin_mux.hboard2virtual:/virtualboard/board.c1PARENT-4-PROJECT_LOC/board.cboard2virtual:/virtualboard/board.h1PARENT-4-PROJECT_LOC/board.hboard2virtual:/virtualboard/clock_freq.c1PARENT-4-PROJECT_LOC/clock_freq.cboard2virtual:/virtualboard/clock_freq.h1PARENT-4-PROJECT_LOC/clock_freq.hboard2virtual:/virtualboard/hardware_init.c1PARENT-1-PROJECT_LOC/hardware_init.cboard2virtual:/virtualboard/gpio_pins.c1PARENT-4-PROJECT_LOC/gpio_pins.cboard2virtual:/virtualboard/gpio_pins.h1PARENT-4-PROJECT_LOC/gpio_pins.hsource2virtual:/virtualsource/main.c1PARENT-1-PROJECT_LOC/main.cdriver2virtual:/virtualdriver/flexcan.c1PARENT-6-PROJECT_LOC/platform/drivers/src/flexcan.cdriver2virtual:/virtualdriver/flexcan.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/flexcan.hdriver2virtual:/virtualdriver/gpt.c1PARENT-6-PROJECT_LOC/platform/drivers/src/gpt.cdriver2virtual:/virtualdriver/gpt.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/gpt.hdriver2virtual:/virtualdriver/uart_imx.c1PARENT-6-PROJECT_LOC/platform/drivers/src/uart_imx.cdriver2virtual:/virtualdriver/uart_imx.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/uart_imx.h + + + diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/ds5/flexcan_loopback_example.wsd b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/ds5/flexcan_loopback_example.wsd new file mode 100644 index 0000000..1fb9e33 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/ds5/flexcan_loopback_example.wsd @@ -0,0 +1,9 @@ + + + + flexcan_loopback_example_imx7d_val_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/ds5/makedir.bat b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/hardware_init.c b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/hardware_init.c new file mode 100644 index 0000000..ad34e0e --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/hardware_init.c @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "board.h" +#include "pin_mux.h" + +void hardware_init(void) +{ + /* Board specific RDC settings */ + BOARD_RdcInit(); + + /* Board specific clock settings */ + BOARD_ClockInit(); + + /* initialize debug uart */ + dbg_uart_init(); + + /* In this example, we need to grasp board flexcan exclusively */ + RDC_SetPdapAccess(RDC, BOARD_FLEXCAN_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false); + + /* Select board flexcan derived from OSC clock(24M) */ + CCM_UpdateRoot(CCM, BOARD_FLEXCAN_CCM_ROOT, ccmRootmuxUartOsc24m, 0, 0); + /* Enable flexcan clock */ + CCM_EnableRoot(CCM, BOARD_FLEXCAN_CCM_ROOT); + CCM_ControlGate(CCM, BOARD_FLEXCAN_CCM_CCGR, ccmClockNeededRunWait); + + /* FLEXCAN Pin setting */ + configure_flexcan_pins(BOARD_FLEXCAN_BASEADDR); + + /* In this example, we need to grasp board GPT exclusively */ + RDC_SetPdapAccess(RDC, BOARD_GPTA_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false); + + /* Select GPTA clock derived from OSC 24M */ + CCM_UpdateRoot(CCM, BOARD_GPTA_CCM_ROOT, ccmRootmuxGptOsc24m, 0, 0); + + /* Enable clock used by GPTA */ + CCM_EnableRoot(CCM, BOARD_GPTA_CCM_ROOT); + CCM_ControlGate(CCM, BOARD_GPTA_CCM_CCGR, ccmClockNeededRunWait); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.ewd b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.ewd @@ -0,0 +1,9419 @@ + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Ram Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.ewp b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.ewp new file mode 100644 index 0000000..1c34180 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.ewp @@ -0,0 +1,1891 @@ + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + + + + +startup$PROJ_DIR$/../../../../../../platform/devices/MCIMX7D/startup/iar/startup_MCIMX7D_M4.s$PROJ_DIR$/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c$PROJ_DIR$/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hutilities$PROJ_DIR$/../../../../../../platform/utilities/src/debug_console_imx.c$PROJ_DIR$/../../../../../../platform/utilities/inc/debug_console_imx.h$PROJ_DIR$/../../../../../../platform/utilities/src/print_scan.c$PROJ_DIR$/../../../../../../platform/utilities/src/print_scan.hsystem$PROJ_DIR$/../../../../../../platform/drivers/inc/ccm_analog_imx7d.h$PROJ_DIR$/../../../../../../platform/drivers/inc/ccm_imx7d.h$PROJ_DIR$/../../../../../../platform/drivers/inc/rdc.h$PROJ_DIR$/../../../../../../platform/drivers/inc/rdc_defs_imx7d.h$PROJ_DIR$/../../../../../../platform/drivers/inc/wdog_imx.h$PROJ_DIR$/../../../../../../platform/drivers/src/ccm_analog_imx7d.c$PROJ_DIR$/../../../../../../platform/drivers/src/ccm_imx7d.c$PROJ_DIR$/../../../../../../platform/drivers/src/rdc.c$PROJ_DIR$/../../../../../../platform/drivers/src/wdog_imx.cboard$PROJ_DIR$/../../../../pin_mux.c$PROJ_DIR$/../../../../pin_mux.h$PROJ_DIR$/../../../../board.c$PROJ_DIR$/../../../../board.h$PROJ_DIR$/../../../../clock_freq.c$PROJ_DIR$/../../../../clock_freq.h$PROJ_DIR$/../hardware_init.c$PROJ_DIR$/../../../../gpio_pins.c$PROJ_DIR$/../../../../gpio_pins.hsource$PROJ_DIR$/../main.cdriver$PROJ_DIR$/../../../../../../platform/drivers/src/flexcan.c$PROJ_DIR$/../../../../../../platform/drivers/inc/flexcan.h$PROJ_DIR$/../../../../../../platform/drivers/src/gpt.c$PROJ_DIR$/../../../../../../platform/drivers/inc/gpt.h$PROJ_DIR$/../../../../../../platform/drivers/src/uart_imx.c$PROJ_DIR$/../../../../../../platform/drivers/inc/uart_imx.h diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.eww b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.eww new file mode 100644 index 0000000..dec459a --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.eww @@ -0,0 +1,4 @@ + + +allflexcan_loopback_exampleReleaseflexcan_loopback_exampleDebugReleaseflexcan_loopback_exampleReleaseDebugflexcan_loopback_exampleDebug +$WS_DIR$/flexcan_loopback_example.ewp diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/main.c b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/main.c new file mode 100644 index 0000000..b269e92 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_loopback/main.c @@ -0,0 +1,212 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include "board.h" +#include "debug_console_imx.h" +#include "flexcan.h" +#include "gpt.h" + +#define TX_MSG_BUF_NUM 13 +#define RX_MSG_BUF_NUM 9 + +#define TX_IDENTIFIER 0x123 +#define RX_IDENTIFIER 0x123 +#define GLOBAL_MASK 0x123 + +//////////////////////////////////////////////////////////////////////////////// +// Constant +//////////////////////////////////////////////////////////////////////////////// +const flexcan_timing_t timing_table[] = { + {7, 3, 7, 7, 6}, /* 125 kHz from 24 MHz OSC */ + {3, 3, 7, 7, 6}, /* 250 kHz from 24 MHz OSC */ + {1, 3, 7, 7, 6}, /* 500 kHz from 24 MHz OSC */ + {0, 3, 7, 7, 6}, /* 1 MHz from 24 MHz OSC */ +}; + +//////////////////////////////////////////////////////////////////////////////// +// Global +//////////////////////////////////////////////////////////////////////////////// +volatile flexcan_msgbuf_t rxBuffer; +volatile bool rxCanReceive; +volatile flexcan_msgbuf_t *txMsgBufPtr; +volatile flexcan_msgbuf_t *rxMsgBufPtr; +volatile uint8_t data = 0; + +//////////////////////////////////////////////////////////////////////////////// +// Code +//////////////////////////////////////////////////////////////////////////////// +void init_flexcan(void) +{ + flexcan_init_config_t initConfig = { + .timing = timing_table[0], + .operatingMode = flexcanLoopBackMode, + .maxMsgBufNum = 16 + }; + + /* Initialize FlexCAN module. */ + FLEXCAN_Init(BOARD_FLEXCAN_BASEADDR, &initConfig); + /* Enable FlexCAN Clock. */ + FLEXCAN_Enable(BOARD_FLEXCAN_BASEADDR); + /* Set FlexCAN to use Global mask mode. */ + FLEXCAN_SetRxMaskMode(BOARD_FLEXCAN_BASEADDR, flexcanRxMaskGlobal); + /* Set FlexCAN global mask. */ + FLEXCAN_SetRxGlobalMask(BOARD_FLEXCAN_BASEADDR, ~CAN_ID_STD(GLOBAL_MASK)); + + /* Clear Tx and Rx message buffer interrupt pending bit. */ + FLEXCAN_ClearMsgBufStatusFlag(BOARD_FLEXCAN_BASEADDR, TX_MSG_BUF_NUM); + FLEXCAN_ClearMsgBufStatusFlag(BOARD_FLEXCAN_BASEADDR, RX_MSG_BUF_NUM); + /* Enable Tx and Rx message buffer interrupt. */ + FLEXCAN_SetMsgBufIntCmd(BOARD_FLEXCAN_BASEADDR, TX_MSG_BUF_NUM, true); + FLEXCAN_SetMsgBufIntCmd(BOARD_FLEXCAN_BASEADDR, RX_MSG_BUF_NUM, true); + + /* Initialize Global variable. */ + rxCanReceive = false; + txMsgBufPtr = FLEXCAN_GetMsgBufPtr(BOARD_FLEXCAN_BASEADDR, TX_MSG_BUF_NUM); + rxMsgBufPtr = FLEXCAN_GetMsgBufPtr(BOARD_FLEXCAN_BASEADDR, RX_MSG_BUF_NUM); + + /* Setup Rx MsgBuf to receive Frame. */ + rxMsgBufPtr->idStd = RX_IDENTIFIER; + rxMsgBufPtr->code = flexcanRxEmpty; + + /* Setup Tx MsgBuf to transmit Frame. */ + txMsgBufPtr->prio = 0x0; /* We don't use local priority */ + txMsgBufPtr->idStd = TX_IDENTIFIER; /* Set Tx Identifier */ + txMsgBufPtr->idExt = 0x0; /* We don't use Extend Id. */ + txMsgBufPtr->dlc = 0x1; /* Send only 1 byte data. */ + txMsgBufPtr->rtr = 0x0; /* Send data frame. */ + txMsgBufPtr->ide = 0x0; /* Frame format is standard. */ + txMsgBufPtr->srr = 0x1; /* Don't care in standard id mode. */ + + /* Set FlexCAN interrupt priority. */ + NVIC_SetPriority(BOARD_FLEXCAN_IRQ_NUM, 3); + /* Enable FlexCAN interrupt. */ + NVIC_EnableIRQ(BOARD_FLEXCAN_IRQ_NUM); +} + +void init_gpt_timer(void) +{ + uint32_t freq; + gpt_mode_config_t config = { + .freeRun = false, + .waitEnable = true, + .stopEnable = true, + .dozeEnable = true, + .dbgEnable = false, + .enableMode = true + }; + + /* Initialize GPT module */ + GPT_Init(BOARD_GPTA_BASEADDR, &config); + /* Set GPT clock source */ + GPT_SetClockSource(BOARD_GPTA_BASEADDR, gptClockSourceOsc); + /* Divide GPTA osc clock source frequency by 2, and divide additional 2 inside GPT module */ + GPT_SetOscPrescaler(BOARD_GPTA_BASEADDR, 1); + GPT_SetPrescaler(BOARD_GPTA_BASEADDR, 1); + + /* Get GPT clock frequency */ + freq = 24000000/4; /* A is bound to OSC directly, with OSC divider 2 */ + /* Set both GPT modules to 1 second duration */ + GPT_SetOutputCompareValue(BOARD_GPTA_BASEADDR, gptOutputCompareChannel1, freq); + /* Set GPT interrupt priority to same value to avoid handler preemption */ + NVIC_SetPriority(BOARD_GPTA_IRQ_NUM, 3); + /* Enable NVIC interrupt */ + NVIC_EnableIRQ(BOARD_GPTA_IRQ_NUM); + /* Enable GPT Output Compare1 interrupt */ + GPT_SetIntCmd(BOARD_GPTA_BASEADDR, gptStatusFlagOutputCompare1, true); + /* GPT start */ + GPT_Enable(BOARD_GPTA_BASEADDR); +} + +int main(void) +{ + /* Initialize board specified hardware. */ + hardware_init(); + + PRINTF("\n\r********* FLEXCAN LOOPBACK TEST *********"); + PRINTF("\n\r Message format: Standard (11 bit id)"); + PRINTF("\n\r Message buffer %d used for Rx.", RX_MSG_BUF_NUM); + PRINTF("\n\r Message buffer %d used for Tx.", TX_MSG_BUF_NUM); + PRINTF("\n\r Interrupt Mode: Enabled"); + PRINTF("\n\r Operating Mode: TX and RX --> LoopBack"); + PRINTF("\n\r*****************************************\n\r"); + + init_flexcan(); + init_gpt_timer(); + + while (true) + { + if (rxCanReceive) + { + rxCanReceive = false; + PRINTF("\r\n\r\nDLC=%d, mb_idx=0x%3x", rxBuffer.dlc, rxBuffer.idStd); + PRINTF("\r\nRX MB data: 0x"); + for (uint8_t i = 0; i < rxBuffer.dlc; i++) + PRINTF("%x ", *(&rxBuffer.data0 + i)); + } + } +} + +void BOARD_GPTA_HANDLER(void) +{ + GPT_ClearStatusFlag(BOARD_GPTA_BASEADDR, gptStatusFlagOutputCompare1); + + /* Prepare data for transmit */ + txMsgBufPtr->data0 = data; /* Load data to message buf. */ + txMsgBufPtr->code = flexcanTxDataOrRemte; /* Start transmit. */ +} + +void BOARD_FLEXCAN_HANDLER(void) +{ + /* Solve Tx interrupt */ + if (FLEXCAN_GetMsgBufStatusFlag(BOARD_FLEXCAN_BASEADDR, TX_MSG_BUF_NUM)) + { + FLEXCAN_ClearMsgBufStatusFlag(BOARD_FLEXCAN_BASEADDR, TX_MSG_BUF_NUM); + data++; + } + + /* Solve Rx interrupt */ + if (FLEXCAN_GetMsgBufStatusFlag(BOARD_FLEXCAN_BASEADDR, RX_MSG_BUF_NUM)) + { + /* Lock message buffer for receive data. */ + FLEXCAN_LockRxMsgBuf(BOARD_FLEXCAN_BASEADDR, RX_MSG_BUF_NUM); + rxBuffer = *rxMsgBufPtr; + FLEXCAN_UnlockAllRxMsgBuf(BOARD_FLEXCAN_BASEADDR); + + FLEXCAN_ClearMsgBufStatusFlag(BOARD_FLEXCAN_BASEADDR, RX_MSG_BUF_NUM); + + rxCanReceive = true; + } +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/CMakeLists.txt b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/CMakeLists.txt new file mode 100644 index 0000000..365d270 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/CMakeLists.txt @@ -0,0 +1,136 @@ +INCLUDE(CMakeForceCompiler) + +# CROSS COMPILER SETTING +SET(CMAKE_SYSTEM_NAME Generic) +CMAKE_MINIMUM_REQUIRED (VERSION 2.6) + +# THE VERSION NUMBER +SET (Tutorial_VERSION_MAJOR 1) +SET (Tutorial_VERSION_MINOR 0) + +# ENABLE ASM +ENABLE_LANGUAGE(ASM) + +SET(CMAKE_STATIC_LIBRARY_PREFIX) +SET(CMAKE_STATIC_LIBRARY_SUFFIX) + +SET(CMAKE_EXECUTABLE_LIBRARY_PREFIX) +SET(CMAKE_EXECUTABLE_LIBRARY_SUFFIX) + + +# CURRENT DIRECTORY +SET(ProjDirPath ${CMAKE_CURRENT_SOURCE_DIR}) + +# DEBUG LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -T${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# RELEASE LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -T${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# DEBUG ASM FLAGS +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG C FLAGS +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# RELEASE ASM FLAGS +SET(CMAKE_ASM_FLAGS_RELEASE "${CMAKE_ASM_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE C FLAGS +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# ASM MACRO +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -D__DEBUG") + +# C MACRO +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__DEBUG") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCPU_IMX7D_M4") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D__NDEBUG") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DCPU_IMX7D_M4") + +# CXX MACRO + +# INCLUDE_DIRECTORIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(flexcan_network_example + "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../../platform/utilities/src/debug_console_imx.c" + "${ProjDirPath}/../../../../../../platform/utilities/inc/debug_console_imx.h" + "${ProjDirPath}/../../../../../../platform/utilities/src/print_scan.c" + "${ProjDirPath}/../../../../../../platform/utilities/src/print_scan.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/ccm_analog_imx7d.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/ccm_imx7d.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/rdc.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/rdc_defs_imx7d.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/wdog_imx.h" + "${ProjDirPath}/../../../../../../platform/drivers/src/ccm_analog_imx7d.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/ccm_imx7d.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/rdc.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/wdog_imx.c" + "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c" + "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.h" + "${ProjDirPath}/../../../../pin_mux.c" + "${ProjDirPath}/../../../../pin_mux.h" + "${ProjDirPath}/../../../../board.c" + "${ProjDirPath}/../../../../board.h" + "${ProjDirPath}/../../../../clock_freq.c" + "${ProjDirPath}/../../../../clock_freq.h" + "${ProjDirPath}/../hardware_init.c" + "${ProjDirPath}/../../../../gpio_pins.c" + "${ProjDirPath}/../../../../gpio_pins.h" + "${ProjDirPath}/../main.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/flexcan.c" + "${ProjDirPath}/../../../../../../platform/drivers/inc/flexcan.h" + "${ProjDirPath}/../../../../../../platform/drivers/src/gpt.c" + "${ProjDirPath}/../../../../../../platform/drivers/inc/gpt.h" + "${ProjDirPath}/../../../../../../platform/drivers/src/uart_imx.c" + "${ProjDirPath}/../../../../../../platform/drivers/inc/uart_imx.h" +) +SET_TARGET_PROPERTIES(flexcan_network_example PROPERTIES OUTPUT_NAME "flexcan_network_example.elf") + +TARGET_LINK_LIBRARIES(flexcan_network_example -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(flexcan_network_example m) +TARGET_LINK_LIBRARIES(flexcan_network_example c) +TARGET_LINK_LIBRARIES(flexcan_network_example gcc) +TARGET_LINK_LIBRARIES(flexcan_network_example nosys) +TARGET_LINK_LIBRARIES(flexcan_network_example -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/flexcan_network_example.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/flexcan_network_example.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET flexcan_network_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/flexcan_network_example.elf ${EXECUTABLE_OUTPUT_PATH}/flexcan_network_example.hex) +ADD_CUSTOM_COMMAND(TARGET flexcan_network_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/flexcan_network_example.elf ${EXECUTABLE_OUTPUT_PATH}/flexcan_network_example.bin) diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_all.bat b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_all.bat new file mode 100755 index 0000000..0cf721f --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_all.bat @@ -0,0 +1,5 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_all.sh b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_all.sh new file mode 100755 index 0000000..3827529 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_all.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_debug.bat b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_debug.bat new file mode 100755 index 0000000..e9ccfdd --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_debug.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_debug.sh b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_debug.sh new file mode 100755 index 0000000..effd076 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_debug.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_release.bat b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_release.bat new file mode 100755 index 0000000..0759349 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_release.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_release.sh b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_release.sh new file mode 100755 index 0000000..a12067d --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/build_release.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/clean.bat b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/clean.bat @@ -0,0 +1,3 @@ +RD /s /Q Debug Release CMakeFiles +DEL /s /Q /F Makefile cmake_install.cmake CMakeCache.txt +pause diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/clean.sh b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/armgcc/clean.sh @@ -0,0 +1,3 @@ +#!/bin/sh +rm -rf debug release CMakeFiles +rm -rf Makefile cmake_install.cmake CMakeCache.txt diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/ds5/.cproject b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/ds5/.cproject new file mode 100644 index 0000000..2d17738 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/ds5/.project b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/ds5/.project new file mode 100644 index 0000000..7f3eb61 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/ds5/.project @@ -0,0 +1,86 @@ + + + flexcan_network_example_imx7d_val_m4 + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.autoBuildTarget + all + + + org.eclipse.cdt.make.core.buildArguments + + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.buildLocation + + + + org.eclipse.cdt.make.core.cleanBuildTarget + clean + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.fullBuildTarget + all + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + startup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sutilities2virtual:/virtualutilities/debug_console_imx.c1PARENT-6-PROJECT_LOC/platform/utilities/src/debug_console_imx.cutilities2virtual:/virtualutilities/debug_console_imx.h1PARENT-6-PROJECT_LOC/platform/utilities/inc/debug_console_imx.hutilities2virtual:/virtualutilities/print_scan.c1PARENT-6-PROJECT_LOC/platform/utilities/src/print_scan.cutilities2virtual:/virtualutilities/print_scan.h1PARENT-6-PROJECT_LOC/platform/utilities/src/print_scan.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/ccm_analog_imx7d.hsystem2virtual:/virtualsystem/ccm_imx7d.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/ccm_imx7d.hsystem2virtual:/virtualsystem/rdc.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/rdc.hsystem2virtual:/virtualsystem/rdc_defs_imx7d.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/rdc_defs_imx7d.hsystem2virtual:/virtualsystem/wdog_imx.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/wdog_imx.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.c1PARENT-6-PROJECT_LOC/platform/drivers/src/ccm_analog_imx7d.csystem2virtual:/virtualsystem/ccm_imx7d.c1PARENT-6-PROJECT_LOC/platform/drivers/src/ccm_imx7d.csystem2virtual:/virtualsystem/rdc.c1PARENT-6-PROJECT_LOC/platform/drivers/src/rdc.csystem2virtual:/virtualsystem/wdog_imx.c1PARENT-6-PROJECT_LOC/platform/drivers/src/wdog_imx.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.c1PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.h1PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hboard2virtual:/virtualboard/pin_mux.c1PARENT-4-PROJECT_LOC/pin_mux.cboard2virtual:/virtualboard/pin_mux.h1PARENT-4-PROJECT_LOC/pin_mux.hboard2virtual:/virtualboard/board.c1PARENT-4-PROJECT_LOC/board.cboard2virtual:/virtualboard/board.h1PARENT-4-PROJECT_LOC/board.hboard2virtual:/virtualboard/clock_freq.c1PARENT-4-PROJECT_LOC/clock_freq.cboard2virtual:/virtualboard/clock_freq.h1PARENT-4-PROJECT_LOC/clock_freq.hboard2virtual:/virtualboard/hardware_init.c1PARENT-1-PROJECT_LOC/hardware_init.cboard2virtual:/virtualboard/gpio_pins.c1PARENT-4-PROJECT_LOC/gpio_pins.cboard2virtual:/virtualboard/gpio_pins.h1PARENT-4-PROJECT_LOC/gpio_pins.hsource2virtual:/virtualsource/main.c1PARENT-1-PROJECT_LOC/main.cdriver2virtual:/virtualdriver/flexcan.c1PARENT-6-PROJECT_LOC/platform/drivers/src/flexcan.cdriver2virtual:/virtualdriver/flexcan.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/flexcan.hdriver2virtual:/virtualdriver/gpt.c1PARENT-6-PROJECT_LOC/platform/drivers/src/gpt.cdriver2virtual:/virtualdriver/gpt.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/gpt.hdriver2virtual:/virtualdriver/uart_imx.c1PARENT-6-PROJECT_LOC/platform/drivers/src/uart_imx.cdriver2virtual:/virtualdriver/uart_imx.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/uart_imx.h + + + diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/ds5/flexcan_network_example.wsd b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/ds5/flexcan_network_example.wsd new file mode 100644 index 0000000..6516eb0 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/ds5/flexcan_network_example.wsd @@ -0,0 +1,9 @@ + + + + flexcan_network_example_imx7d_val_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/ds5/makedir.bat b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/hardware_init.c b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/hardware_init.c new file mode 100644 index 0000000..ad34e0e --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/hardware_init.c @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "board.h" +#include "pin_mux.h" + +void hardware_init(void) +{ + /* Board specific RDC settings */ + BOARD_RdcInit(); + + /* Board specific clock settings */ + BOARD_ClockInit(); + + /* initialize debug uart */ + dbg_uart_init(); + + /* In this example, we need to grasp board flexcan exclusively */ + RDC_SetPdapAccess(RDC, BOARD_FLEXCAN_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false); + + /* Select board flexcan derived from OSC clock(24M) */ + CCM_UpdateRoot(CCM, BOARD_FLEXCAN_CCM_ROOT, ccmRootmuxUartOsc24m, 0, 0); + /* Enable flexcan clock */ + CCM_EnableRoot(CCM, BOARD_FLEXCAN_CCM_ROOT); + CCM_ControlGate(CCM, BOARD_FLEXCAN_CCM_CCGR, ccmClockNeededRunWait); + + /* FLEXCAN Pin setting */ + configure_flexcan_pins(BOARD_FLEXCAN_BASEADDR); + + /* In this example, we need to grasp board GPT exclusively */ + RDC_SetPdapAccess(RDC, BOARD_GPTA_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false); + + /* Select GPTA clock derived from OSC 24M */ + CCM_UpdateRoot(CCM, BOARD_GPTA_CCM_ROOT, ccmRootmuxGptOsc24m, 0, 0); + + /* Enable clock used by GPTA */ + CCM_EnableRoot(CCM, BOARD_GPTA_CCM_ROOT); + CCM_ControlGate(CCM, BOARD_GPTA_CCM_CCGR, ccmClockNeededRunWait); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.ewd b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.ewd @@ -0,0 +1,9419 @@ + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Ram Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.ewp b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.ewp new file mode 100644 index 0000000..4359073 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.ewp @@ -0,0 +1,1891 @@ + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + + + + +startup$PROJ_DIR$/../../../../../../platform/devices/MCIMX7D/startup/iar/startup_MCIMX7D_M4.s$PROJ_DIR$/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c$PROJ_DIR$/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hutilities$PROJ_DIR$/../../../../../../platform/utilities/src/debug_console_imx.c$PROJ_DIR$/../../../../../../platform/utilities/inc/debug_console_imx.h$PROJ_DIR$/../../../../../../platform/utilities/src/print_scan.c$PROJ_DIR$/../../../../../../platform/utilities/src/print_scan.hsystem$PROJ_DIR$/../../../../../../platform/drivers/inc/ccm_analog_imx7d.h$PROJ_DIR$/../../../../../../platform/drivers/inc/ccm_imx7d.h$PROJ_DIR$/../../../../../../platform/drivers/inc/rdc.h$PROJ_DIR$/../../../../../../platform/drivers/inc/rdc_defs_imx7d.h$PROJ_DIR$/../../../../../../platform/drivers/inc/wdog_imx.h$PROJ_DIR$/../../../../../../platform/drivers/src/ccm_analog_imx7d.c$PROJ_DIR$/../../../../../../platform/drivers/src/ccm_imx7d.c$PROJ_DIR$/../../../../../../platform/drivers/src/rdc.c$PROJ_DIR$/../../../../../../platform/drivers/src/wdog_imx.cboard$PROJ_DIR$/../../../../pin_mux.c$PROJ_DIR$/../../../../pin_mux.h$PROJ_DIR$/../../../../board.c$PROJ_DIR$/../../../../board.h$PROJ_DIR$/../../../../clock_freq.c$PROJ_DIR$/../../../../clock_freq.h$PROJ_DIR$/../hardware_init.c$PROJ_DIR$/../../../../gpio_pins.c$PROJ_DIR$/../../../../gpio_pins.hsource$PROJ_DIR$/../main.cdriver$PROJ_DIR$/../../../../../../platform/drivers/src/flexcan.c$PROJ_DIR$/../../../../../../platform/drivers/inc/flexcan.h$PROJ_DIR$/../../../../../../platform/drivers/src/gpt.c$PROJ_DIR$/../../../../../../platform/drivers/inc/gpt.h$PROJ_DIR$/../../../../../../platform/drivers/src/uart_imx.c$PROJ_DIR$/../../../../../../platform/drivers/inc/uart_imx.h diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.eww b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.eww new file mode 100644 index 0000000..e2faa39 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.eww @@ -0,0 +1,4 @@ + + +allflexcan_network_exampleReleaseflexcan_network_exampleDebugReleaseflexcan_network_exampleReleaseDebugflexcan_network_exampleDebug +$WS_DIR$/flexcan_network_example.ewp diff --git a/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/main.c b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/main.c new file mode 100644 index 0000000..232b24a --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/flexcan/flexcan_network/main.c @@ -0,0 +1,221 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include "board.h" +#include "debug_console_imx.h" +#include "flexcan.h" +#include "gpt.h" + +#define NODE 1 +#define TX_MSG_BUF_NUM 8 +#define RX_MSG_BUF_NUM 9 + +#if (1 == NODE) + #define TX_IDENTIFIER 0x123 + #define RX_IDENTIFIER 0x321 + #define GLOBAL_MASK 0x321 +#else + #define TX_IDENTIFIER 0x321 + #define RX_IDENTIFIER 0x123 + #define GLOBAL_MASK 0x123 +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Constant +//////////////////////////////////////////////////////////////////////////////// +const flexcan_timing_t timing_table[] = { + {7, 3, 7, 7, 6}, /* 125 kHz from 24 MHz OSC */ + {3, 3, 7, 7, 6}, /* 250 kHz from 24 MHz OSC */ + {1, 3, 7, 7, 6}, /* 500 kHz from 24 MHz OSC */ + {0, 3, 7, 7, 6}, /* 1 MHz from 24 MHz OSC */ +}; + +//////////////////////////////////////////////////////////////////////////////// +// Global +//////////////////////////////////////////////////////////////////////////////// +volatile flexcan_msgbuf_t rxBuffer; +volatile bool rxCanReceive; +volatile flexcan_msgbuf_t *txMsgBufPtr; +volatile flexcan_msgbuf_t *rxMsgBufPtr; +volatile uint8_t data = 0; + +//////////////////////////////////////////////////////////////////////////////// +// Code +//////////////////////////////////////////////////////////////////////////////// + +void init_flexcan(void) +{ + flexcan_init_config_t initConfig = { + .timing = timing_table[0], + .operatingMode = flexCanNormalMode, + .maxMsgBufNum = 16 + }; + + /* Initialize FlexCAN module. */ + FLEXCAN_Init(BOARD_FLEXCAN_BASEADDR, &initConfig); + /* Enable FlexCAN Clock. */ + FLEXCAN_Enable(BOARD_FLEXCAN_BASEADDR); + /* Set FlexCAN to use Global mask mode. */ + FLEXCAN_SetRxMaskMode(BOARD_FLEXCAN_BASEADDR, flexcanRxMaskGlobal); + /* Set FlexCAN global mask. */ + FLEXCAN_SetRxGlobalMask(BOARD_FLEXCAN_BASEADDR, ~CAN_ID_STD(GLOBAL_MASK)); + + /* Clear Tx and Rx message buffer interrupt pending bit. */ + FLEXCAN_ClearMsgBufStatusFlag(BOARD_FLEXCAN_BASEADDR, TX_MSG_BUF_NUM); + FLEXCAN_ClearMsgBufStatusFlag(BOARD_FLEXCAN_BASEADDR, RX_MSG_BUF_NUM); + /* Enable Tx and Rx message buffer interrupt. */ + FLEXCAN_SetMsgBufIntCmd(BOARD_FLEXCAN_BASEADDR, TX_MSG_BUF_NUM, true); + FLEXCAN_SetMsgBufIntCmd(BOARD_FLEXCAN_BASEADDR, RX_MSG_BUF_NUM, true); + + /* Initialize Global variable. */ + rxCanReceive = false; + txMsgBufPtr = FLEXCAN_GetMsgBufPtr(BOARD_FLEXCAN_BASEADDR, TX_MSG_BUF_NUM); + rxMsgBufPtr = FLEXCAN_GetMsgBufPtr(BOARD_FLEXCAN_BASEADDR, RX_MSG_BUF_NUM); + + /* Setup Rx MsgBuf to receive Frame. */ + rxMsgBufPtr->idStd = RX_IDENTIFIER; + rxMsgBufPtr->code = flexcanRxEmpty; + + txMsgBufPtr->prio = 0x0; /* We don't use local priority */ + txMsgBufPtr->idStd = TX_IDENTIFIER; /* Set Tx Identifier */ + txMsgBufPtr->idExt = 0x0; /* We don't use Extend Id. */ + txMsgBufPtr->dlc = 0x1; /* Send only 1 byte data. */ + txMsgBufPtr->rtr = 0x0; /* Send data frame. */ + txMsgBufPtr->ide = 0x0; /* Frame format is standard. */ + txMsgBufPtr->srr = 0x1; /* Don't care in standard id mode. */ + + /* Set FlexCAN interrupt priority. */ + NVIC_SetPriority(BOARD_FLEXCAN_IRQ_NUM, 3); + /* Enable FlexCAN interrupt. */ + NVIC_EnableIRQ(BOARD_FLEXCAN_IRQ_NUM); +} + +void init_gpt(void) +{ + uint32_t freq; + gpt_mode_config_t config = { + .freeRun = false, + .waitEnable = true, + .stopEnable = true, + .dozeEnable = true, + .dbgEnable = false, + .enableMode = true + }; + + /* Initialize GPT module */ + GPT_Init(BOARD_GPTA_BASEADDR, &config); + /* Set GPT clock source */ + GPT_SetClockSource(BOARD_GPTA_BASEADDR, gptClockSourceOsc); + /* Divide GPTA osc clock source frequency by 2, and divide additional 2 inside GPT module */ + GPT_SetOscPrescaler(BOARD_GPTA_BASEADDR, 1); + GPT_SetPrescaler(BOARD_GPTA_BASEADDR, 1); + + /* Get GPT clock frequency */ + freq = 24000000/4; /* A is bound to OSC directly, with OSC divider 2 */ + /* Set both GPT modules to 1 second duration */ + GPT_SetOutputCompareValue(BOARD_GPTA_BASEADDR, gptOutputCompareChannel1, freq); + /* Set GPT interrupt priority to same value to avoid handler preemption */ + NVIC_SetPriority(BOARD_GPTA_IRQ_NUM, 3); + /* Enable NVIC interrupt */ + NVIC_EnableIRQ(BOARD_GPTA_IRQ_NUM); + /* Enable GPT Output Compare1 interrupt */ + GPT_SetIntCmd(BOARD_GPTA_BASEADDR, gptStatusFlagOutputCompare1, true); + /* GPT start */ + GPT_Enable(BOARD_GPTA_BASEADDR); +} + +int main(void) +{ + /* Initialize board specified hardware. */ + hardware_init(); + + PRINTF("\n\r********* FLEXCAN NETWORK TEST *********"); + PRINTF("\n\r Message format: Standard (11 bit id)"); + PRINTF("\n\r Message buffer %d used for Rx.", RX_MSG_BUF_NUM); + PRINTF("\n\r Message buffer %d used for Tx.", TX_MSG_BUF_NUM); + PRINTF("\n\r Interrupt Mode: Enabled"); + PRINTF("\n\r Operating Mode: TX and RX --> Normal"); + PRINTF("\n\r****************************************\n\r"); + + PRINTF("\n\r\n\rNODE is %d\n\r", NODE); + + init_flexcan(); + init_gpt(); + + while (true) + { + if (rxCanReceive) + { + rxCanReceive = false; + PRINTF("\r\n\r\nDLC=%d, mb_idx=0x%3x", rxBuffer.dlc, rxBuffer.idStd); + PRINTF("\r\nRX MB data: 0x"); + for (uint8_t i = 0; i < rxBuffer.dlc; i++) + PRINTF("%x ", *(&rxBuffer.data0 + i)); + } + } +} + +void BOARD_GPTA_HANDLER(void) +{ + GPT_ClearStatusFlag(BOARD_GPTA_BASEADDR, gptStatusFlagOutputCompare1); + + /* Prepare data for transmit */ + txMsgBufPtr->data0 = data; /* Load data to message buf. */ + txMsgBufPtr->code = flexcanTxDataOrRemte; /* Start transmit. */ +} + +void BOARD_FLEXCAN_HANDLER(void) +{ + /* Solve Tx interrupt */ + if (FLEXCAN_GetMsgBufStatusFlag(BOARD_FLEXCAN_BASEADDR, TX_MSG_BUF_NUM)) + { + FLEXCAN_ClearMsgBufStatusFlag(BOARD_FLEXCAN_BASEADDR, TX_MSG_BUF_NUM); + data++; + } + + /* Solve Rx interrupt */ + if (FLEXCAN_GetMsgBufStatusFlag(BOARD_FLEXCAN_BASEADDR, RX_MSG_BUF_NUM)) + { + /* Lock message buffer for receive data. */ + FLEXCAN_LockRxMsgBuf(BOARD_FLEXCAN_BASEADDR, RX_MSG_BUF_NUM); + rxBuffer = *rxMsgBufPtr; + FLEXCAN_UnlockAllRxMsgBuf(BOARD_FLEXCAN_BASEADDR); + + FLEXCAN_ClearMsgBufStatusFlag(BOARD_FLEXCAN_BASEADDR, RX_MSG_BUF_NUM); + + rxCanReceive = true; + } +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/CMakeLists.txt b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/CMakeLists.txt new file mode 100644 index 0000000..259676e --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/CMakeLists.txt @@ -0,0 +1,134 @@ +INCLUDE(CMakeForceCompiler) + +# CROSS COMPILER SETTING +SET(CMAKE_SYSTEM_NAME Generic) +CMAKE_MINIMUM_REQUIRED (VERSION 2.6) + +# THE VERSION NUMBER +SET (Tutorial_VERSION_MAJOR 1) +SET (Tutorial_VERSION_MINOR 0) + +# ENABLE ASM +ENABLE_LANGUAGE(ASM) + +SET(CMAKE_STATIC_LIBRARY_PREFIX) +SET(CMAKE_STATIC_LIBRARY_SUFFIX) + +SET(CMAKE_EXECUTABLE_LIBRARY_PREFIX) +SET(CMAKE_EXECUTABLE_LIBRARY_SUFFIX) + + +# CURRENT DIRECTORY +SET(ProjDirPath ${CMAKE_CURRENT_SOURCE_DIR}) + +# DEBUG LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -T${ProjDirPath}/../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# RELEASE LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -T${ProjDirPath}/../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# DEBUG ASM FLAGS +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG C FLAGS +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# RELEASE ASM FLAGS +SET(CMAKE_ASM_FLAGS_RELEASE "${CMAKE_ASM_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE C FLAGS +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# ASM MACRO +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -D__DEBUG") + +# C MACRO +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__DEBUG") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCPU_IMX7D_M4") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D__NDEBUG") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DCPU_IMX7D_M4") + +# CXX MACRO + +# INCLUDE_DIRECTORIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(gpio_imx_example + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../platform/utilities/src/debug_console_imx.c" + "${ProjDirPath}/../../../../../platform/utilities/inc/debug_console_imx.h" + "${ProjDirPath}/../../../../../platform/utilities/src/print_scan.c" + "${ProjDirPath}/../../../../../platform/utilities/src/print_scan.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/ccm_analog_imx7d.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/ccm_imx7d.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/rdc.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/rdc_defs_imx7d.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/wdog_imx.h" + "${ProjDirPath}/../../../../../platform/drivers/src/ccm_analog_imx7d.c" + "${ProjDirPath}/../../../../../platform/drivers/src/ccm_imx7d.c" + "${ProjDirPath}/../../../../../platform/drivers/src/rdc.c" + "${ProjDirPath}/../../../../../platform/drivers/src/wdog_imx.c" + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c" + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.h" + "${ProjDirPath}/../../../pin_mux.c" + "${ProjDirPath}/../../../pin_mux.h" + "${ProjDirPath}/../../../board.c" + "${ProjDirPath}/../../../board.h" + "${ProjDirPath}/../../../clock_freq.c" + "${ProjDirPath}/../../../clock_freq.h" + "${ProjDirPath}/../hardware_init.c" + "${ProjDirPath}/../../../gpio_pins.c" + "${ProjDirPath}/../../../gpio_pins.h" + "${ProjDirPath}/../main.c" + "${ProjDirPath}/../../../../../platform/drivers/src/gpio_imx.c" + "${ProjDirPath}/../../../../../platform/drivers/inc/gpio_imx.h" + "${ProjDirPath}/../../../../../platform/drivers/src/uart_imx.c" + "${ProjDirPath}/../../../../../platform/drivers/inc/uart_imx.h" +) +SET_TARGET_PROPERTIES(gpio_imx_example PROPERTIES OUTPUT_NAME "gpio_imx_example.elf") + +TARGET_LINK_LIBRARIES(gpio_imx_example -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(gpio_imx_example m) +TARGET_LINK_LIBRARIES(gpio_imx_example c) +TARGET_LINK_LIBRARIES(gpio_imx_example gcc) +TARGET_LINK_LIBRARIES(gpio_imx_example nosys) +TARGET_LINK_LIBRARIES(gpio_imx_example -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/gpio_imx_example.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/gpio_imx_example.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET gpio_imx_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/gpio_imx_example.elf ${EXECUTABLE_OUTPUT_PATH}/gpio_imx_example.hex) +ADD_CUSTOM_COMMAND(TARGET gpio_imx_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/gpio_imx_example.elf ${EXECUTABLE_OUTPUT_PATH}/gpio_imx_example.bin) diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_all.bat b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_all.bat new file mode 100755 index 0000000..6d41d86 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_all.bat @@ -0,0 +1,5 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_all.sh b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_all.sh new file mode 100755 index 0000000..ebb0c25 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_all.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_debug.bat b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_debug.bat new file mode 100755 index 0000000..bf3b902 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_debug.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_debug.sh b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_debug.sh new file mode 100755 index 0000000..571868b --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_debug.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_release.bat b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_release.bat new file mode 100755 index 0000000..e229a83 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_release.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_release.sh b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_release.sh new file mode 100755 index 0000000..035ce4e --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/build_release.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/clean.bat b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/clean.bat @@ -0,0 +1,3 @@ +RD /s /Q Debug Release CMakeFiles +DEL /s /Q /F Makefile cmake_install.cmake CMakeCache.txt +pause diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/clean.sh b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/armgcc/clean.sh @@ -0,0 +1,3 @@ +#!/bin/sh +rm -rf debug release CMakeFiles +rm -rf Makefile cmake_install.cmake CMakeCache.txt diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/ds5/.cproject b/examples/imx7d_val_m4/driver_examples/gpio_imx/ds5/.cproject new file mode 100644 index 0000000..d7ca3b0 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/ds5/.project b/examples/imx7d_val_m4/driver_examples/gpio_imx/ds5/.project new file mode 100644 index 0000000..7439047 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/ds5/.project @@ -0,0 +1,86 @@ + + + gpio_imx_example_imx7d_val_m4 + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.autoBuildTarget + all + + + org.eclipse.cdt.make.core.buildArguments + + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.buildLocation + + + + org.eclipse.cdt.make.core.cleanBuildTarget + clean + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.fullBuildTarget + all + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + startup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sutilities2virtual:/virtualutilities/debug_console_imx.c1PARENT-5-PROJECT_LOC/platform/utilities/src/debug_console_imx.cutilities2virtual:/virtualutilities/debug_console_imx.h1PARENT-5-PROJECT_LOC/platform/utilities/inc/debug_console_imx.hutilities2virtual:/virtualutilities/print_scan.c1PARENT-5-PROJECT_LOC/platform/utilities/src/print_scan.cutilities2virtual:/virtualutilities/print_scan.h1PARENT-5-PROJECT_LOC/platform/utilities/src/print_scan.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/ccm_analog_imx7d.hsystem2virtual:/virtualsystem/ccm_imx7d.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/ccm_imx7d.hsystem2virtual:/virtualsystem/rdc.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/rdc.hsystem2virtual:/virtualsystem/rdc_defs_imx7d.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/rdc_defs_imx7d.hsystem2virtual:/virtualsystem/wdog_imx.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/wdog_imx.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.c1PARENT-5-PROJECT_LOC/platform/drivers/src/ccm_analog_imx7d.csystem2virtual:/virtualsystem/ccm_imx7d.c1PARENT-5-PROJECT_LOC/platform/drivers/src/ccm_imx7d.csystem2virtual:/virtualsystem/rdc.c1PARENT-5-PROJECT_LOC/platform/drivers/src/rdc.csystem2virtual:/virtualsystem/wdog_imx.c1PARENT-5-PROJECT_LOC/platform/drivers/src/wdog_imx.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.c1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.h1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hboard2virtual:/virtualboard/pin_mux.c1PARENT-3-PROJECT_LOC/pin_mux.cboard2virtual:/virtualboard/pin_mux.h1PARENT-3-PROJECT_LOC/pin_mux.hboard2virtual:/virtualboard/board.c1PARENT-3-PROJECT_LOC/board.cboard2virtual:/virtualboard/board.h1PARENT-3-PROJECT_LOC/board.hboard2virtual:/virtualboard/clock_freq.c1PARENT-3-PROJECT_LOC/clock_freq.cboard2virtual:/virtualboard/clock_freq.h1PARENT-3-PROJECT_LOC/clock_freq.hboard2virtual:/virtualboard/hardware_init.c1PARENT-1-PROJECT_LOC/hardware_init.cboard2virtual:/virtualboard/gpio_pins.c1PARENT-3-PROJECT_LOC/gpio_pins.cboard2virtual:/virtualboard/gpio_pins.h1PARENT-3-PROJECT_LOC/gpio_pins.hsource2virtual:/virtualsource/main.c1PARENT-1-PROJECT_LOC/main.cdriver2virtual:/virtualdriver/gpio_imx.c1PARENT-5-PROJECT_LOC/platform/drivers/src/gpio_imx.cdriver2virtual:/virtualdriver/gpio_imx.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/gpio_imx.hdriver2virtual:/virtualdriver/uart_imx.c1PARENT-5-PROJECT_LOC/platform/drivers/src/uart_imx.cdriver2virtual:/virtualdriver/uart_imx.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/uart_imx.h + + + diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/ds5/gpio_imx_example.wsd b/examples/imx7d_val_m4/driver_examples/gpio_imx/ds5/gpio_imx_example.wsd new file mode 100644 index 0000000..95eb38d --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/ds5/gpio_imx_example.wsd @@ -0,0 +1,9 @@ + + + + gpio_imx_example_imx7d_val_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/ds5/makedir.bat b/examples/imx7d_val_m4/driver_examples/gpio_imx/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/hardware_init.c b/examples/imx7d_val_m4/driver_examples/gpio_imx/hardware_init.c new file mode 100644 index 0000000..938e508 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/hardware_init.c @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "gpio_pins.h" +#include "board.h" + +void hardware_init(void) +{ + /* Board specific RDC settings */ + BOARD_RdcInit(); + /* Board specific clock settings */ + BOARD_ClockInit(); + /* initialize debug uart */ + dbg_uart_init(); + + /* In this demo, we need to share board GPIO without RDC SEMAPHORE */ + RDC_SetPdapAccess(RDC, BOARD_GPIO_LED_RDC_PDAP, 0xFF, false, false); + /* BOARD_GPIO_LED_RDC_PDAP is same as BOARD_GPIO_KEY_RDC_PDAP, so bypass + * BOARD_GPIO_KEY_RDC_PDAP setting */ + + /* Enable gpio clock gate */ + CCM_ControlGate(CCM, BOARD_GPIO_CCM_CCGR, ccmClockNeededRunWait); + /* Configure gpio pin IOMUX */ + configure_gpio_pin(BOARD_GPIO_LED_CONFIG); + configure_gpio_pin(BOARD_GPIO_KEY_CONFIG); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/iar/gpio_imx_example.ewd b/examples/imx7d_val_m4/driver_examples/gpio_imx/iar/gpio_imx_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/iar/gpio_imx_example.ewd @@ -0,0 +1,9419 @@ + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Ram Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/iar/gpio_imx_example.ewp b/examples/imx7d_val_m4/driver_examples/gpio_imx/iar/gpio_imx_example.ewp new file mode 100644 index 0000000..9873a22 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/iar/gpio_imx_example.ewp @@ -0,0 +1,1891 @@ + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + + + + +startup$PROJ_DIR$/../../../../../platform/devices/MCIMX7D/startup/iar/startup_MCIMX7D_M4.s$PROJ_DIR$/../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c$PROJ_DIR$/../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hutilities$PROJ_DIR$/../../../../../platform/utilities/src/debug_console_imx.c$PROJ_DIR$/../../../../../platform/utilities/inc/debug_console_imx.h$PROJ_DIR$/../../../../../platform/utilities/src/print_scan.c$PROJ_DIR$/../../../../../platform/utilities/src/print_scan.hsystem$PROJ_DIR$/../../../../../platform/drivers/inc/ccm_analog_imx7d.h$PROJ_DIR$/../../../../../platform/drivers/inc/ccm_imx7d.h$PROJ_DIR$/../../../../../platform/drivers/inc/rdc.h$PROJ_DIR$/../../../../../platform/drivers/inc/rdc_defs_imx7d.h$PROJ_DIR$/../../../../../platform/drivers/inc/wdog_imx.h$PROJ_DIR$/../../../../../platform/drivers/src/ccm_analog_imx7d.c$PROJ_DIR$/../../../../../platform/drivers/src/ccm_imx7d.c$PROJ_DIR$/../../../../../platform/drivers/src/rdc.c$PROJ_DIR$/../../../../../platform/drivers/src/wdog_imx.cboard$PROJ_DIR$/../../../pin_mux.c$PROJ_DIR$/../../../pin_mux.h$PROJ_DIR$/../../../board.c$PROJ_DIR$/../../../board.h$PROJ_DIR$/../../../clock_freq.c$PROJ_DIR$/../../../clock_freq.h$PROJ_DIR$/../hardware_init.c$PROJ_DIR$/../../../gpio_pins.c$PROJ_DIR$/../../../gpio_pins.hsource$PROJ_DIR$/../main.cdriver$PROJ_DIR$/../../../../../platform/drivers/src/gpio_imx.c$PROJ_DIR$/../../../../../platform/drivers/inc/gpio_imx.h$PROJ_DIR$/../../../../../platform/drivers/src/uart_imx.c$PROJ_DIR$/../../../../../platform/drivers/inc/uart_imx.h diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/iar/gpio_imx_example.eww b/examples/imx7d_val_m4/driver_examples/gpio_imx/iar/gpio_imx_example.eww new file mode 100644 index 0000000..e6fbb01 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/iar/gpio_imx_example.eww @@ -0,0 +1,4 @@ + + +allgpio_imx_exampleReleasegpio_imx_exampleDebugReleasegpio_imx_exampleReleaseDebuggpio_imx_exampleDebug +$WS_DIR$/gpio_imx_example.ewp diff --git a/examples/imx7d_val_m4/driver_examples/gpio_imx/main.c b/examples/imx7d_val_m4/driver_examples/gpio_imx/main.c new file mode 100644 index 0000000..bc51468 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpio_imx/main.c @@ -0,0 +1,147 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include "board.h" +#include "gpio_pins.h" +#include "gpio_imx.h" +#include "debug_console_imx.h" + +/* button relevent variables */ +static volatile uint8_t keyPressCount; +static uint8_t keyLastState; +static uint8_t keyState; + +/****************************************************************************** +* +* Function Name: main +* Comments: GPIO module initialize, interrupt and IO operation. +* This example include 2 step: +* 1)Configure BUTTON1 as interrupt mode, falling edge, and test +* by pressing the button 3 times to trigger interrupt. +* 2)Configure BUTTON1 as GPIO functionality +* and check the button's state(pressed or released) through switch LED +* to on or off if this board has LED. +* +******************************************************************************/ +int main( void ) +{ + /* hardware initialiize, include RDC, IOMUX, Uart debug initialize */ + hardware_init(); + + PRINTF("\n\r====================== GPIO Example ========================\n\r"); + +#ifdef BOARD_GPIO_LED_CONFIG + /* GPIO module initialize, configure "LED" as output and drive the output high level */ + gpio_init_t ledInitConfig = { + .pin = BOARD_GPIO_LED_CONFIG->pin, + .direction = gpioDigitalOutput, + .interruptMode = gpioNoIntmode + }; + GPIO_Init(BOARD_GPIO_LED_CONFIG->base, &ledInitConfig); + + /* drive the LED output high level. */ + GPIO_WritePinOutput(BOARD_GPIO_LED_CONFIG->base, BOARD_GPIO_LED_CONFIG->pin, gpioPinSet); +#endif + +#ifdef BOARD_GPIO_KEY_CONFIG + /* GPIO module initialize, configure button as interrupt mode. */ + gpio_init_t keyInitConfig = { + .pin = BOARD_GPIO_KEY_CONFIG->pin, + .direction = gpioDigitalInput, + .interruptMode = gpioIntFallingEdge + }; + GPIO_Init(BOARD_GPIO_KEY_CONFIG->base, &keyInitConfig); + + NVIC_EnableIRQ(BOARD_GPIO_KEY_IRQ_NUM); + /* Clear the interrupt state, this operation is necessary, because the GPIO module maybe confuse + the first rising edge as interrupt*/ + GPIO_ClearStatusFlag(BOARD_GPIO_KEY_CONFIG->base, BOARD_GPIO_KEY_CONFIG->pin); + /* Enable GPIO pin interrupt */ + GPIO_SetPinIntMode(BOARD_GPIO_KEY_CONFIG->base, BOARD_GPIO_KEY_CONFIG->pin, true); + /* press button trigger interrupt */ + PRINTF("\n\r=================== GPIO Interrupt =====================\n\r"); + PRINTF("The (%s) button is configured to trigger GPIO interrupt.\n\r", BOARD_GPIO_KEY_CONFIG->name); + PRINTF("Press the (%s) button 3 times to continue.\n\n\r", BOARD_GPIO_KEY_CONFIG->name); + + keyPressCount = 1; + while(keyPressCount < 4); + + /* Now disable the interrupt */ + NVIC_DisableIRQ(BOARD_GPIO_KEY_IRQ_NUM); + GPIO_SetPinIntMode(BOARD_GPIO_KEY_CONFIG->base, BOARD_GPIO_KEY_CONFIG->pin, false); + + /* GPIO module initialize, configure button as GPIO functionality. */ + keyInitConfig.pin = BOARD_GPIO_KEY_CONFIG->pin; + keyInitConfig.direction = gpioDigitalInput; + keyInitConfig.interruptMode = gpioNoIntmode; + GPIO_Init(BOARD_GPIO_KEY_CONFIG->base, &keyInitConfig); + + /* Configure button as GPIO functionality + and check the button's state(pressed or released) to switch LED on or off */ + + /* Check the buttion's status(pressed or released) */ + PRINTF("\n\r================= GPIO Functionality==================\n\r"); + PRINTF("The (%s) button state is now polled.\n\r", BOARD_GPIO_KEY_CONFIG->name); + PRINTF("Press the (%s) button to switch LED on or off\n\n\r", BOARD_GPIO_KEY_CONFIG->name); + + keyLastState = 1; //initial button released, logic 1 + + for(;;) + { + keyState = GPIO_ReadPinInput(BOARD_GPIO_KEY_CONFIG->base, BOARD_GPIO_KEY_CONFIG->pin); + if(keyState != keyLastState) + { + PRINTF("Button %s\n\r", keyState ? "released" : "pressed"); + keyLastState = keyState; +#ifdef BOARD_GPIO_LED_CONFIG + GPIO_WritePinOutput(BOARD_GPIO_LED_CONFIG->base, BOARD_GPIO_LED_CONFIG->pin, keyState ? gpioPinSet : gpioPinClear); +#endif + } + } +#endif +} + +/****************************************************************************** +* Function Name: BOARD_GPIO_BTN_HANDLER +* Comments: The interrupt service routine triggered by gpio +* Note: Need to consider how to eliminate the button shake problem +******************************************************************************/ +void BOARD_GPIO_KEY_HANDLER(void) +{ + PRINTF("Button pressed %d time. \n\r", keyPressCount); + keyPressCount++; + /* clear the interrupt status */ + GPIO_ClearStatusFlag(BOARD_GPIO_KEY_CONFIG->base, BOARD_GPIO_KEY_CONFIG->pin); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/gpt/armgcc/CMakeLists.txt b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/CMakeLists.txt new file mode 100644 index 0000000..271de2f --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/CMakeLists.txt @@ -0,0 +1,132 @@ +INCLUDE(CMakeForceCompiler) + +# CROSS COMPILER SETTING +SET(CMAKE_SYSTEM_NAME Generic) +CMAKE_MINIMUM_REQUIRED (VERSION 2.6) + +# THE VERSION NUMBER +SET (Tutorial_VERSION_MAJOR 1) +SET (Tutorial_VERSION_MINOR 0) + +# ENABLE ASM +ENABLE_LANGUAGE(ASM) + +SET(CMAKE_STATIC_LIBRARY_PREFIX) +SET(CMAKE_STATIC_LIBRARY_SUFFIX) + +SET(CMAKE_EXECUTABLE_LIBRARY_PREFIX) +SET(CMAKE_EXECUTABLE_LIBRARY_SUFFIX) + + +# CURRENT DIRECTORY +SET(ProjDirPath ${CMAKE_CURRENT_SOURCE_DIR}) + +# DEBUG LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -T${ProjDirPath}/../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# RELEASE LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -T${ProjDirPath}/../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# DEBUG ASM FLAGS +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG C FLAGS +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# RELEASE ASM FLAGS +SET(CMAKE_ASM_FLAGS_RELEASE "${CMAKE_ASM_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE C FLAGS +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# ASM MACRO +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -D__DEBUG") + +# C MACRO +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__DEBUG") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCPU_IMX7D_M4") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D__NDEBUG") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DCPU_IMX7D_M4") + +# CXX MACRO + +# INCLUDE_DIRECTORIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(gpt_example + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../platform/utilities/src/debug_console_imx.c" + "${ProjDirPath}/../../../../../platform/utilities/inc/debug_console_imx.h" + "${ProjDirPath}/../../../../../platform/utilities/src/print_scan.c" + "${ProjDirPath}/../../../../../platform/utilities/src/print_scan.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/ccm_analog_imx7d.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/ccm_imx7d.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/rdc.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/rdc_defs_imx7d.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/wdog_imx.h" + "${ProjDirPath}/../../../../../platform/drivers/src/ccm_analog_imx7d.c" + "${ProjDirPath}/../../../../../platform/drivers/src/ccm_imx7d.c" + "${ProjDirPath}/../../../../../platform/drivers/src/rdc.c" + "${ProjDirPath}/../../../../../platform/drivers/src/wdog_imx.c" + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c" + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.h" + "${ProjDirPath}/../../../pin_mux.c" + "${ProjDirPath}/../../../pin_mux.h" + "${ProjDirPath}/../../../board.c" + "${ProjDirPath}/../../../board.h" + "${ProjDirPath}/../../../clock_freq.c" + "${ProjDirPath}/../../../clock_freq.h" + "${ProjDirPath}/../hardware_init.c" + "${ProjDirPath}/../main.c" + "${ProjDirPath}/../../../../../platform/drivers/src/gpt.c" + "${ProjDirPath}/../../../../../platform/drivers/inc/gpt.h" + "${ProjDirPath}/../../../../../platform/drivers/src/uart_imx.c" + "${ProjDirPath}/../../../../../platform/drivers/inc/uart_imx.h" +) +SET_TARGET_PROPERTIES(gpt_example PROPERTIES OUTPUT_NAME "gpt_example.elf") + +TARGET_LINK_LIBRARIES(gpt_example -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(gpt_example m) +TARGET_LINK_LIBRARIES(gpt_example c) +TARGET_LINK_LIBRARIES(gpt_example gcc) +TARGET_LINK_LIBRARIES(gpt_example nosys) +TARGET_LINK_LIBRARIES(gpt_example -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/gpt_example.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/gpt_example.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET gpt_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/gpt_example.elf ${EXECUTABLE_OUTPUT_PATH}/gpt_example.hex) +ADD_CUSTOM_COMMAND(TARGET gpt_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/gpt_example.elf ${EXECUTABLE_OUTPUT_PATH}/gpt_example.bin) diff --git a/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_all.bat b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_all.bat new file mode 100755 index 0000000..6d41d86 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_all.bat @@ -0,0 +1,5 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_all.sh b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_all.sh new file mode 100755 index 0000000..ebb0c25 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_all.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_debug.bat b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_debug.bat new file mode 100755 index 0000000..bf3b902 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_debug.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_debug.sh b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_debug.sh new file mode 100755 index 0000000..571868b --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_debug.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_release.bat b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_release.bat new file mode 100755 index 0000000..e229a83 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_release.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_release.sh b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_release.sh new file mode 100755 index 0000000..035ce4e --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/build_release.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/gpt/armgcc/clean.bat b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/clean.bat @@ -0,0 +1,3 @@ +RD /s /Q Debug Release CMakeFiles +DEL /s /Q /F Makefile cmake_install.cmake CMakeCache.txt +pause diff --git a/examples/imx7d_val_m4/driver_examples/gpt/armgcc/clean.sh b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/armgcc/clean.sh @@ -0,0 +1,3 @@ +#!/bin/sh +rm -rf debug release CMakeFiles +rm -rf Makefile cmake_install.cmake CMakeCache.txt diff --git a/examples/imx7d_val_m4/driver_examples/gpt/ds5/.cproject b/examples/imx7d_val_m4/driver_examples/gpt/ds5/.cproject new file mode 100644 index 0000000..ce17c21 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/gpt/ds5/.project b/examples/imx7d_val_m4/driver_examples/gpt/ds5/.project new file mode 100644 index 0000000..5deba40 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/ds5/.project @@ -0,0 +1,86 @@ + + + gpt_example_imx7d_val_m4 + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.autoBuildTarget + all + + + org.eclipse.cdt.make.core.buildArguments + + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.buildLocation + + + + org.eclipse.cdt.make.core.cleanBuildTarget + clean + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.fullBuildTarget + all + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + startup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sutilities2virtual:/virtualutilities/debug_console_imx.c1PARENT-5-PROJECT_LOC/platform/utilities/src/debug_console_imx.cutilities2virtual:/virtualutilities/debug_console_imx.h1PARENT-5-PROJECT_LOC/platform/utilities/inc/debug_console_imx.hutilities2virtual:/virtualutilities/print_scan.c1PARENT-5-PROJECT_LOC/platform/utilities/src/print_scan.cutilities2virtual:/virtualutilities/print_scan.h1PARENT-5-PROJECT_LOC/platform/utilities/src/print_scan.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/ccm_analog_imx7d.hsystem2virtual:/virtualsystem/ccm_imx7d.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/ccm_imx7d.hsystem2virtual:/virtualsystem/rdc.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/rdc.hsystem2virtual:/virtualsystem/rdc_defs_imx7d.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/rdc_defs_imx7d.hsystem2virtual:/virtualsystem/wdog_imx.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/wdog_imx.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.c1PARENT-5-PROJECT_LOC/platform/drivers/src/ccm_analog_imx7d.csystem2virtual:/virtualsystem/ccm_imx7d.c1PARENT-5-PROJECT_LOC/platform/drivers/src/ccm_imx7d.csystem2virtual:/virtualsystem/rdc.c1PARENT-5-PROJECT_LOC/platform/drivers/src/rdc.csystem2virtual:/virtualsystem/wdog_imx.c1PARENT-5-PROJECT_LOC/platform/drivers/src/wdog_imx.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.c1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.h1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hboard2virtual:/virtualboard/pin_mux.c1PARENT-3-PROJECT_LOC/pin_mux.cboard2virtual:/virtualboard/pin_mux.h1PARENT-3-PROJECT_LOC/pin_mux.hboard2virtual:/virtualboard/board.c1PARENT-3-PROJECT_LOC/board.cboard2virtual:/virtualboard/board.h1PARENT-3-PROJECT_LOC/board.hboard2virtual:/virtualboard/clock_freq.c1PARENT-3-PROJECT_LOC/clock_freq.cboard2virtual:/virtualboard/clock_freq.h1PARENT-3-PROJECT_LOC/clock_freq.hboard2virtual:/virtualboard/hardware_init.c1PARENT-1-PROJECT_LOC/hardware_init.csource2virtual:/virtualsource/main.c1PARENT-1-PROJECT_LOC/main.cdriver2virtual:/virtualdriver/gpt.c1PARENT-5-PROJECT_LOC/platform/drivers/src/gpt.cdriver2virtual:/virtualdriver/gpt.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/gpt.hdriver2virtual:/virtualdriver/uart_imx.c1PARENT-5-PROJECT_LOC/platform/drivers/src/uart_imx.cdriver2virtual:/virtualdriver/uart_imx.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/uart_imx.h + + + diff --git a/examples/imx7d_val_m4/driver_examples/gpt/ds5/gpt_example.wsd b/examples/imx7d_val_m4/driver_examples/gpt/ds5/gpt_example.wsd new file mode 100644 index 0000000..e9c1c9b --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/ds5/gpt_example.wsd @@ -0,0 +1,9 @@ + + + + gpt_example_imx7d_val_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/gpt/ds5/makedir.bat b/examples/imx7d_val_m4/driver_examples/gpt/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7d_val_m4/driver_examples/gpt/hardware_init.c b/examples/imx7d_val_m4/driver_examples/gpt/hardware_init.c new file mode 100644 index 0000000..b198654 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/hardware_init.c @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "board.h" +#include "pin_mux.h" + +void hardware_init(void) +{ + /* Board specific RDC settings */ + BOARD_RdcInit(); + + /* Board specific clock settings */ + BOARD_ClockInit(); + + /* initialize debug uart */ + dbg_uart_init(); + + /* In this example, we need to grasp board GPT exclusively */ + RDC_SetPdapAccess(RDC, BOARD_GPTA_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false); + RDC_SetPdapAccess(RDC, BOARD_GPTB_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false); + + /* Enable PLL PFD0 for GPTB */ + CCM_ControlGate(CCM, ccmPllGateSys, ccmClockNeededRunWait); + CCM_ControlGate(CCM, ccmPllGatePfd0, ccmClockNeededRunWait); + + /* Select GPTA clock derived from OSC 24M */ + CCM_UpdateRoot(CCM, BOARD_GPTA_CCM_ROOT, ccmRootmuxGptOsc24m, 0, 0); + /* Select GPTB clock derived from PLL PFD0 clock divide 4 (pre=2 post=2) */ + CCM_UpdateRoot(CCM, BOARD_GPTB_CCM_ROOT, ccmRootmuxGptSysPllPfd0, 1, 1); + + /* Enable clock used by GPTA */ + CCM_EnableRoot(CCM, BOARD_GPTA_CCM_ROOT); + CCM_ControlGate(CCM, BOARD_GPTA_CCM_CCGR, ccmClockNeededRunWait); + /* Enable clock used by GPTB */ + CCM_EnableRoot(CCM, BOARD_GPTB_CCM_ROOT); + CCM_ControlGate(CCM, BOARD_GPTB_CCM_CCGR, ccmClockNeededRunWait); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/gpt/iar/gpt_example.ewd b/examples/imx7d_val_m4/driver_examples/gpt/iar/gpt_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/iar/gpt_example.ewd @@ -0,0 +1,9419 @@ + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Ram Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/imx7d_val_m4/driver_examples/gpt/iar/gpt_example.ewp b/examples/imx7d_val_m4/driver_examples/gpt/iar/gpt_example.ewp new file mode 100644 index 0000000..3a2b848 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/iar/gpt_example.ewp @@ -0,0 +1,1891 @@ + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + + + + +startup$PROJ_DIR$/../../../../../platform/devices/MCIMX7D/startup/iar/startup_MCIMX7D_M4.s$PROJ_DIR$/../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c$PROJ_DIR$/../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hutilities$PROJ_DIR$/../../../../../platform/utilities/src/debug_console_imx.c$PROJ_DIR$/../../../../../platform/utilities/inc/debug_console_imx.h$PROJ_DIR$/../../../../../platform/utilities/src/print_scan.c$PROJ_DIR$/../../../../../platform/utilities/src/print_scan.hsystem$PROJ_DIR$/../../../../../platform/drivers/inc/ccm_analog_imx7d.h$PROJ_DIR$/../../../../../platform/drivers/inc/ccm_imx7d.h$PROJ_DIR$/../../../../../platform/drivers/inc/rdc.h$PROJ_DIR$/../../../../../platform/drivers/inc/rdc_defs_imx7d.h$PROJ_DIR$/../../../../../platform/drivers/inc/wdog_imx.h$PROJ_DIR$/../../../../../platform/drivers/src/ccm_analog_imx7d.c$PROJ_DIR$/../../../../../platform/drivers/src/ccm_imx7d.c$PROJ_DIR$/../../../../../platform/drivers/src/rdc.c$PROJ_DIR$/../../../../../platform/drivers/src/wdog_imx.cboard$PROJ_DIR$/../../../pin_mux.c$PROJ_DIR$/../../../pin_mux.h$PROJ_DIR$/../../../board.c$PROJ_DIR$/../../../board.h$PROJ_DIR$/../../../clock_freq.c$PROJ_DIR$/../../../clock_freq.h$PROJ_DIR$/../hardware_init.csource$PROJ_DIR$/../main.cdriver$PROJ_DIR$/../../../../../platform/drivers/src/gpt.c$PROJ_DIR$/../../../../../platform/drivers/inc/gpt.h$PROJ_DIR$/../../../../../platform/drivers/src/uart_imx.c$PROJ_DIR$/../../../../../platform/drivers/inc/uart_imx.h diff --git a/examples/imx7d_val_m4/driver_examples/gpt/iar/gpt_example.eww b/examples/imx7d_val_m4/driver_examples/gpt/iar/gpt_example.eww new file mode 100644 index 0000000..4e7ff2a --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/iar/gpt_example.eww @@ -0,0 +1,4 @@ + + +allgpt_exampleReleasegpt_exampleDebugReleasegpt_exampleReleaseDebuggpt_exampleDebug +$WS_DIR$/gpt_example.ewp diff --git a/examples/imx7d_val_m4/driver_examples/gpt/main.c b/examples/imx7d_val_m4/driver_examples/gpt/main.c new file mode 100644 index 0000000..8292b03 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/gpt/main.c @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "gpt.h" +#include "board.h" +#include "clock_freq.h" +#include "debug_console_imx.h" + +/* This case will run for 5 seconds */ +static volatile uint32_t num = 10; +static uint32_t counterA, counterB; + +int main(void) +{ + uint32_t freqA, freqB; + gpt_mode_config_t config = { + .freeRun = false, + .waitEnable = true, + .stopEnable = true, + .dozeEnable = true, + .dbgEnable = false, + .enableMode = true + }; + + hardware_init(); + + /* Initialize GPT module */ + GPT_Init(BOARD_GPTA_BASEADDR, &config); + GPT_Init(BOARD_GPTB_BASEADDR, &config); + + /* Set GPT clock source, when use OSC as clock source, we need to make sure the OSC freq + * after divided by OscPrescaler should be less than half of the peripheral clock set by + * CCM */ + GPT_SetClockSource(BOARD_GPTA_BASEADDR, gptClockSourceOsc); + GPT_SetClockSource(BOARD_GPTB_BASEADDR, gptClockSourcePeriph); + + /* Divide GPTA osc clock source frequency by 2, and divide additional 2 inside GPT module */ + GPT_SetOscPrescaler(BOARD_GPTA_BASEADDR, 1); + GPT_SetPrescaler(BOARD_GPTA_BASEADDR, 1); + /* Divide GPTB clock source frequency by 2 inside GPT module */ + GPT_SetPrescaler(BOARD_GPTB_BASEADDR, 1); + + /* Get GPT clock frequency */ + freqA = 24000000 / 2; /* A is bound to OSC directly, with OSC divider 2 */ + freqB = get_gpt_clock_freq(BOARD_GPTB_BASEADDR); /* Get B peripheral clock freq */ + /* GPTA and GPTB frequency is divided by 2 inside module */ + freqA /= 2; + freqB /= 2; + + /* Set both GPT modules to 1 second duration */ + GPT_SetOutputCompareValue(BOARD_GPTA_BASEADDR, gptOutputCompareChannel1, freqA); + GPT_SetOutputCompareValue(BOARD_GPTB_BASEADDR, gptOutputCompareChannel1, freqB); + + /* Set GPT interrupt priority to same value to avoid handler preemption */ + NVIC_SetPriority(BOARD_GPTA_IRQ_NUM, 3); + NVIC_SetPriority(BOARD_GPTB_IRQ_NUM, 3); + /* Enable NVIC interrupt */ + NVIC_EnableIRQ(BOARD_GPTA_IRQ_NUM); + NVIC_EnableIRQ(BOARD_GPTB_IRQ_NUM); + + /* Enable GPT Output Compare1 interrupt */ + GPT_SetIntCmd(BOARD_GPTA_BASEADDR, gptStatusFlagOutputCompare1, true); + GPT_SetIntCmd(BOARD_GPTB_BASEADDR, gptStatusFlagOutputCompare1, true); + + PRINTF("GPT timer will now start\n\r"); + PRINTF("counter/freq ratio should be close to 0.0 or 1.0 ...\n\r"); + /* GPT start */ + GPT_Enable(BOARD_GPTA_BASEADDR); + GPT_Enable(BOARD_GPTB_BASEADDR); + + while (true) + { + __WFI(); + + while ((num & 1) != 0); /* wait both timer handled */ + + PRINTF("\tGPT A freq %u, counter %u.\n\r", freqA, counterA); + PRINTF("\tGPT B freq %u, counter %u.\n\r", freqB, counterB); + + if (num == 0) + { + /* Stop GPT */ + GPT_Disable(BOARD_GPTA_BASEADDR); + GPT_Disable(BOARD_GPTB_BASEADDR); + PRINTF("GPT example finished...\n\r"); + } + } +} + +void BOARD_GPTA_HANDLER() +{ + GPT_ClearStatusFlag(BOARD_GPTA_BASEADDR, gptStatusFlagOutputCompare1); + + if (num && --num) + counterB = GPT_ReadCounter(BOARD_GPTB_BASEADDR); +} + +void BOARD_GPTB_HANDLER() +{ + GPT_ClearStatusFlag(BOARD_GPTB_BASEADDR, gptStatusFlagOutputCompare1); + + if (num && --num) + counterA = GPT_ReadCounter(BOARD_GPTA_BASEADDR); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/CMakeLists.txt b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/CMakeLists.txt new file mode 100644 index 0000000..46f21d9 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/CMakeLists.txt @@ -0,0 +1,132 @@ +INCLUDE(CMakeForceCompiler) + +# CROSS COMPILER SETTING +SET(CMAKE_SYSTEM_NAME Generic) +CMAKE_MINIMUM_REQUIRED (VERSION 2.6) + +# THE VERSION NUMBER +SET (Tutorial_VERSION_MAJOR 1) +SET (Tutorial_VERSION_MINOR 0) + +# ENABLE ASM +ENABLE_LANGUAGE(ASM) + +SET(CMAKE_STATIC_LIBRARY_PREFIX) +SET(CMAKE_STATIC_LIBRARY_SUFFIX) + +SET(CMAKE_EXECUTABLE_LIBRARY_PREFIX) +SET(CMAKE_EXECUTABLE_LIBRARY_SUFFIX) + + +# CURRENT DIRECTORY +SET(ProjDirPath ${CMAKE_CURRENT_SOURCE_DIR}) + +# DEBUG LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -T${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# RELEASE LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -T${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# DEBUG ASM FLAGS +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG C FLAGS +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# RELEASE ASM FLAGS +SET(CMAKE_ASM_FLAGS_RELEASE "${CMAKE_ASM_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE C FLAGS +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# ASM MACRO +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -D__DEBUG") + +# C MACRO +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__DEBUG") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCPU_IMX7D_M4") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D__NDEBUG") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DCPU_IMX7D_M4") + +# CXX MACRO + +# INCLUDE_DIRECTORIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(i2c_imx_interrupt_example + "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../../platform/utilities/src/debug_console_imx.c" + "${ProjDirPath}/../../../../../../platform/utilities/inc/debug_console_imx.h" + "${ProjDirPath}/../../../../../../platform/utilities/src/print_scan.c" + "${ProjDirPath}/../../../../../../platform/utilities/src/print_scan.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/ccm_analog_imx7d.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/ccm_imx7d.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/rdc.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/rdc_defs_imx7d.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/wdog_imx.h" + "${ProjDirPath}/../../../../../../platform/drivers/src/ccm_analog_imx7d.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/ccm_imx7d.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/rdc.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/wdog_imx.c" + "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c" + "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.h" + "${ProjDirPath}/../../../../pin_mux.c" + "${ProjDirPath}/../../../../pin_mux.h" + "${ProjDirPath}/../../../../board.c" + "${ProjDirPath}/../../../../board.h" + "${ProjDirPath}/../../../../clock_freq.c" + "${ProjDirPath}/../../../../clock_freq.h" + "${ProjDirPath}/../hardware_init.c" + "${ProjDirPath}/../main.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/i2c_imx.c" + "${ProjDirPath}/../../../../../../platform/drivers/inc/i2c_imx.h" + "${ProjDirPath}/../../../../../../platform/drivers/src/uart_imx.c" + "${ProjDirPath}/../../../../../../platform/drivers/inc/uart_imx.h" +) +SET_TARGET_PROPERTIES(i2c_imx_interrupt_example PROPERTIES OUTPUT_NAME "i2c_imx_interrupt_example.elf") + +TARGET_LINK_LIBRARIES(i2c_imx_interrupt_example -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(i2c_imx_interrupt_example m) +TARGET_LINK_LIBRARIES(i2c_imx_interrupt_example c) +TARGET_LINK_LIBRARIES(i2c_imx_interrupt_example gcc) +TARGET_LINK_LIBRARIES(i2c_imx_interrupt_example nosys) +TARGET_LINK_LIBRARIES(i2c_imx_interrupt_example -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/i2c_imx_interrupt_example.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/i2c_imx_interrupt_example.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET i2c_imx_interrupt_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/i2c_imx_interrupt_example.elf ${EXECUTABLE_OUTPUT_PATH}/i2c_imx_interrupt_example.hex) +ADD_CUSTOM_COMMAND(TARGET i2c_imx_interrupt_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/i2c_imx_interrupt_example.elf ${EXECUTABLE_OUTPUT_PATH}/i2c_imx_interrupt_example.bin) diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_all.bat b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_all.bat new file mode 100755 index 0000000..0cf721f --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_all.bat @@ -0,0 +1,5 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_all.sh b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_all.sh new file mode 100755 index 0000000..3827529 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_all.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_debug.bat b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_debug.bat new file mode 100755 index 0000000..e9ccfdd --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_debug.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_debug.sh b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_debug.sh new file mode 100755 index 0000000..effd076 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_debug.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_release.bat b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_release.bat new file mode 100755 index 0000000..0759349 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_release.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_release.sh b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_release.sh new file mode 100755 index 0000000..a12067d --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/build_release.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/clean.bat b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/clean.bat @@ -0,0 +1,3 @@ +RD /s /Q Debug Release CMakeFiles +DEL /s /Q /F Makefile cmake_install.cmake CMakeCache.txt +pause diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/clean.sh b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/armgcc/clean.sh @@ -0,0 +1,3 @@ +#!/bin/sh +rm -rf debug release CMakeFiles +rm -rf Makefile cmake_install.cmake CMakeCache.txt diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/ds5/.cproject b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/ds5/.cproject new file mode 100644 index 0000000..ba88236 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/ds5/.project b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/ds5/.project new file mode 100644 index 0000000..0955f49 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/ds5/.project @@ -0,0 +1,86 @@ + + + i2c_imx_interrupt_example_imx7d_val_m4 + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.autoBuildTarget + all + + + org.eclipse.cdt.make.core.buildArguments + + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.buildLocation + + + + org.eclipse.cdt.make.core.cleanBuildTarget + clean + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.fullBuildTarget + all + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + startup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sutilities2virtual:/virtualutilities/debug_console_imx.c1PARENT-6-PROJECT_LOC/platform/utilities/src/debug_console_imx.cutilities2virtual:/virtualutilities/debug_console_imx.h1PARENT-6-PROJECT_LOC/platform/utilities/inc/debug_console_imx.hutilities2virtual:/virtualutilities/print_scan.c1PARENT-6-PROJECT_LOC/platform/utilities/src/print_scan.cutilities2virtual:/virtualutilities/print_scan.h1PARENT-6-PROJECT_LOC/platform/utilities/src/print_scan.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/ccm_analog_imx7d.hsystem2virtual:/virtualsystem/ccm_imx7d.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/ccm_imx7d.hsystem2virtual:/virtualsystem/rdc.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/rdc.hsystem2virtual:/virtualsystem/rdc_defs_imx7d.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/rdc_defs_imx7d.hsystem2virtual:/virtualsystem/wdog_imx.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/wdog_imx.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.c1PARENT-6-PROJECT_LOC/platform/drivers/src/ccm_analog_imx7d.csystem2virtual:/virtualsystem/ccm_imx7d.c1PARENT-6-PROJECT_LOC/platform/drivers/src/ccm_imx7d.csystem2virtual:/virtualsystem/rdc.c1PARENT-6-PROJECT_LOC/platform/drivers/src/rdc.csystem2virtual:/virtualsystem/wdog_imx.c1PARENT-6-PROJECT_LOC/platform/drivers/src/wdog_imx.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.c1PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.h1PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hboard2virtual:/virtualboard/pin_mux.c1PARENT-4-PROJECT_LOC/pin_mux.cboard2virtual:/virtualboard/pin_mux.h1PARENT-4-PROJECT_LOC/pin_mux.hboard2virtual:/virtualboard/board.c1PARENT-4-PROJECT_LOC/board.cboard2virtual:/virtualboard/board.h1PARENT-4-PROJECT_LOC/board.hboard2virtual:/virtualboard/clock_freq.c1PARENT-4-PROJECT_LOC/clock_freq.cboard2virtual:/virtualboard/clock_freq.h1PARENT-4-PROJECT_LOC/clock_freq.hboard2virtual:/virtualboard/hardware_init.c1PARENT-1-PROJECT_LOC/hardware_init.csource2virtual:/virtualsource/main.c1PARENT-1-PROJECT_LOC/main.cdriver2virtual:/virtualdriver/i2c_imx.c1PARENT-6-PROJECT_LOC/platform/drivers/src/i2c_imx.cdriver2virtual:/virtualdriver/i2c_imx.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/i2c_imx.hdriver2virtual:/virtualdriver/uart_imx.c1PARENT-6-PROJECT_LOC/platform/drivers/src/uart_imx.cdriver2virtual:/virtualdriver/uart_imx.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/uart_imx.h + + + diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/ds5/i2c_imx_interrupt_example.wsd b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/ds5/i2c_imx_interrupt_example.wsd new file mode 100644 index 0000000..b783f76 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/ds5/i2c_imx_interrupt_example.wsd @@ -0,0 +1,9 @@ + + + + i2c_imx_interrupt_example_imx7d_val_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/ds5/makedir.bat b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/hardware_init.c b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/hardware_init.c new file mode 100644 index 0000000..3ffd205 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/hardware_init.c @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "board.h" +#include "pin_mux.h" + +void hardware_init(void) +{ + /* Board specific RDC settings */ + BOARD_RdcInit(); + + /* Board specific clock settings */ + BOARD_ClockInit(); + + /* initialize debug uart */ + dbg_uart_init(); + + /* In this example, we need to grasp board I2C exclusively */ + RDC_SetPdapAccess(RDC, BOARD_I2C_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false); + + /* Select I2C clock derived from OSC clock(24M) */ + CCM_UpdateRoot(CCM, BOARD_I2C_CCM_ROOT, ccmRootmuxI2cOsc24m, 0, 0); + /* Enable I2C clock */ + CCM_EnableRoot(CCM, BOARD_I2C_CCM_ROOT); + CCM_ControlGate(CCM, BOARD_I2C_CCM_CCGR, ccmClockNeededRunWait); + + /* I2C Pin setting */ + configure_i2c_pins(BOARD_I2C_BASEADDR); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/iar/i2c_imx_interrupt_example.ewd b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/iar/i2c_imx_interrupt_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/iar/i2c_imx_interrupt_example.ewd @@ -0,0 +1,9419 @@ + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Ram Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/iar/i2c_imx_interrupt_example.ewp b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/iar/i2c_imx_interrupt_example.ewp new file mode 100644 index 0000000..99bf4df --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/iar/i2c_imx_interrupt_example.ewp @@ -0,0 +1,1891 @@ + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + + + + +startup$PROJ_DIR$/../../../../../../platform/devices/MCIMX7D/startup/iar/startup_MCIMX7D_M4.s$PROJ_DIR$/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c$PROJ_DIR$/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hutilities$PROJ_DIR$/../../../../../../platform/utilities/src/debug_console_imx.c$PROJ_DIR$/../../../../../../platform/utilities/inc/debug_console_imx.h$PROJ_DIR$/../../../../../../platform/utilities/src/print_scan.c$PROJ_DIR$/../../../../../../platform/utilities/src/print_scan.hsystem$PROJ_DIR$/../../../../../../platform/drivers/inc/ccm_analog_imx7d.h$PROJ_DIR$/../../../../../../platform/drivers/inc/ccm_imx7d.h$PROJ_DIR$/../../../../../../platform/drivers/inc/rdc.h$PROJ_DIR$/../../../../../../platform/drivers/inc/rdc_defs_imx7d.h$PROJ_DIR$/../../../../../../platform/drivers/inc/wdog_imx.h$PROJ_DIR$/../../../../../../platform/drivers/src/ccm_analog_imx7d.c$PROJ_DIR$/../../../../../../platform/drivers/src/ccm_imx7d.c$PROJ_DIR$/../../../../../../platform/drivers/src/rdc.c$PROJ_DIR$/../../../../../../platform/drivers/src/wdog_imx.cboard$PROJ_DIR$/../../../../pin_mux.c$PROJ_DIR$/../../../../pin_mux.h$PROJ_DIR$/../../../../board.c$PROJ_DIR$/../../../../board.h$PROJ_DIR$/../../../../clock_freq.c$PROJ_DIR$/../../../../clock_freq.h$PROJ_DIR$/../hardware_init.csource$PROJ_DIR$/../main.cdriver$PROJ_DIR$/../../../../../../platform/drivers/src/i2c_imx.c$PROJ_DIR$/../../../../../../platform/drivers/inc/i2c_imx.h$PROJ_DIR$/../../../../../../platform/drivers/src/uart_imx.c$PROJ_DIR$/../../../../../../platform/drivers/inc/uart_imx.h diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/iar/i2c_imx_interrupt_example.eww b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/iar/i2c_imx_interrupt_example.eww new file mode 100644 index 0000000..4a5ef8c --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/iar/i2c_imx_interrupt_example.eww @@ -0,0 +1,4 @@ + + +alli2c_imx_interrupt_exampleReleasei2c_imx_interrupt_exampleDebugReleasei2c_imx_interrupt_exampleReleaseDebugi2c_imx_interrupt_exampleDebug +$WS_DIR$/i2c_imx_interrupt_example.ewp diff --git a/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/main.c b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/main.c new file mode 100644 index 0000000..15f1c59 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/i2c_imx/i2c_interrupt/main.c @@ -0,0 +1,388 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include "board.h" +#include "debug_console_imx.h" +#include "i2c_imx.h" + +#define EEPROM_ADDRESS (0x50) + +typedef struct _i2c_state { + const uint8_t* cmdBuff; /*!< The buffer of I2C command. */ + const uint8_t* txBuff; /*!< The buffer of data being sent.*/ + uint8_t* rxBuff; /*!< The buffer of received data. */ + volatile uint32_t cmdSize; /*!< The remaining number of commands to be transmitted. */ + volatile uint32_t txSize; /*!< The remaining number of bytes to be transmitted. */ + volatile uint32_t rxSize; /*!< The remaining number of bytes to be received. */ + volatile bool isBusy; /*!< True if there is an active transmission. */ + volatile uint32_t operateDir; /*!< Overall I2C bus operating direction. */ + volatile uint32_t currentDir; /*!< Current Data transfer direction. */ + volatile uint32_t currentMode; /*!< Current I2C Bus role of this module. */ +} i2c_state_t; + +/* I2C runtime state structure */ +static i2c_state_t i2cState; + +static bool compare(uint8_t* bufA, uint8_t* bufB, uint32_t length); + +static void I2C_XFER_Config(i2c_init_config_t* initConfig); +static bool I2C_XFER_Write(const uint8_t* cmdBuff, uint32_t cmdSize, const uint8_t* txBuffer, uint32_t txSize); +static bool I2C_XFER_Read(const uint8_t* cmdBuff, uint32_t cmdSize, uint8_t* rxBuffer, uint32_t rxSize); +static bool I2C_XFER_IsBusy(void); + +int main(void) +{ + uint8_t txBuffer[5]; + uint8_t rxBuffer[5]; + uint8_t cmdBuffer[5]; + + /* Setup I2C init structure. */ + i2c_init_config_t i2cInitConfig = { + .clockRate = get_i2c_clock_freq(BOARD_I2C_BASEADDR), + .baudRate = 400000u, + .slaveAddress = 0x00 + }; + + /* Initialize board specified hardware. */ + hardware_init(); + PRINTF("\n\r++++++++++++++++ I2C Send/Receive Interrupt Driven Example +++++++++++++++++\n\r"); + PRINTF("This example will write data to on board EEPROM through I2C Bus\n\r"); + PRINTF("and read them back to see if the EEPROM is programmed successfully. \n\r\n\r"); + + PRINTF("[1].Initialize the I2C module with initialize structure. \n\r"); + I2C_XFER_Config(&i2cInitConfig); + + PRINTF("[2].Launch a I2C write action to 0x0000 address. \n\r"); + cmdBuffer[0] = EEPROM_ADDRESS << 1; + cmdBuffer[1] = 0x00; + cmdBuffer[2] = 0x00; + + PRINTF("[3].Prepare Data for Sending. \n\r"); + txBuffer[0] = 0x11; + txBuffer[1] = 0x22; + txBuffer[2] = 0x33; + txBuffer[3] = 0x44; + txBuffer[4] = 0x55; + + PRINTF("[4].Write data to EEPROM. \n\r"); + I2C_XFER_Write(cmdBuffer, 3, txBuffer, 5); + PRINTF("[5].Wait until transmission is finished. \n\r"); + while(I2C_XFER_IsBusy()); + + PRINTF("[6].Launch a I2C read action from 0x0000 address. \n\r"); + cmdBuffer[0] = EEPROM_ADDRESS << 1; + cmdBuffer[1] = 0x00; + cmdBuffer[2] = 0x00; + cmdBuffer[3] = (EEPROM_ADDRESS << 1) + 1; + + PRINTF("[7].Read data from EEPROM. \n\r"); + I2C_XFER_Read(cmdBuffer, 4, rxBuffer, 5); + PRINTF("[8].Wait until transmission is finished. \n\r"); + while (I2C_XFER_IsBusy()); + + PRINTF("[9].Compare data between txBuf and rxBuf: \n\r"); + if (compare(txBuffer, rxBuffer, 5)) + PRINTF(" txBuf and rxBuf are same, example passed!!!\n\r"); + else + PRINTF(" txBuf and rxBuf are different, example failed!!! \n\r"); + + while (true); +} + +static bool compare(uint8_t* bufA, uint8_t* bufB, uint32_t length) +{ + for (uint32_t i = 0; i < length; i++) + { + if (bufA[i] != bufB[i]) + return false; + } + + return true; +} + +static void I2C_XFER_Config(i2c_init_config_t* initConfig) +{ + /* Initialize I2C state structure content. */ + i2cState.cmdBuff = 0; + i2cState.txBuff = 0; + i2cState.rxBuff = 0; + i2cState.cmdSize = 0; + i2cState.txSize = 0; + i2cState.rxSize = 0; + i2cState.isBusy = false; + i2cState.operateDir = i2cDirectionReceive; + i2cState.currentDir = i2cDirectionReceive; + i2cState.currentMode = i2cModeSlave; + + /* Initialize I2C baud rate, mode, transfer direction and slave address. */ + I2C_Init(BOARD_I2C_BASEADDR, initConfig); + + /* Set I2C Interrupt priority */ + NVIC_SetPriority(BOARD_I2C_IRQ_NUM, 3); + + /* Call core API to enable the IRQ. */ + NVIC_EnableIRQ(BOARD_I2C_IRQ_NUM); + + /* Finally, enable the I2C module */ + I2C_Enable(BOARD_I2C_BASEADDR); +} + +static bool I2C_XFER_Write(const uint8_t* cmdBuff, uint32_t cmdSize, + const uint8_t* txBuffer, uint32_t txSize) +{ + if ((i2cState.isBusy) || (0 == txSize)) + return false; + + /* Initialize i2c transfer struct */ + i2cState.cmdBuff = cmdBuff; + i2cState.cmdSize = cmdSize; + i2cState.txBuff = txBuffer; + i2cState.txSize = txSize; + i2cState.isBusy = true; + i2cState.operateDir = i2cDirectionTransmit; + + /* Clear I2C interrupt flag to avoid spurious interrupt */ + I2C_ClearStatusFlag(BOARD_I2C_BASEADDR, i2cStatusInterrupt); + + if (I2C_GetStatusFlag(BOARD_I2C_BASEADDR, i2cStatusBusBusy)) + { + /* Reset i2c transfer state. */ + i2cState.operateDir = i2cDirectionReceive; + i2cState.isBusy = false; + return false; + } + + /* Set I2C work under Tx mode */ + I2C_SetDirMode(BOARD_I2C_BASEADDR, i2cDirectionTransmit); + i2cState.currentDir = i2cDirectionTransmit; + + /* Switch to Master Mode and Send Start Signal. */ + I2C_SetWorkMode(BOARD_I2C_BASEADDR, i2cModeMaster); + i2cState.currentMode = i2cModeMaster; + + if (0 != cmdSize) + { + I2C_WriteByte(BOARD_I2C_BASEADDR, *i2cState.cmdBuff); + i2cState.cmdBuff++; + i2cState.cmdSize--; + } + else + { + I2C_WriteByte(BOARD_I2C_BASEADDR, *i2cState.txBuff); + i2cState.txBuff++; + i2cState.txSize--; + } + + /* Enable I2C interrupt, subsequent data transfer will be handled in ISR. */ + I2C_SetIntCmd(BOARD_I2C_BASEADDR, true); + + return true; +} + +static bool I2C_XFER_Read(const uint8_t* cmdBuff, uint32_t cmdSize, + uint8_t* rxBuffer, uint32_t rxSize) +{ + if ((i2cState.isBusy) || (0 == rxSize)) + return false; + + /* Initialize i2c transfer struct */ + i2cState.cmdBuff = cmdBuff; + i2cState.cmdSize = cmdSize; + i2cState.rxBuff = rxBuffer; + i2cState.rxSize = rxSize; + i2cState.isBusy = true; + i2cState.operateDir = i2cDirectionReceive; + + /* Clear I2C interrupt flag to avoid spurious interrupt */ + I2C_ClearStatusFlag(BOARD_I2C_BASEADDR, i2cStatusInterrupt); + + if (I2C_GetStatusFlag(BOARD_I2C_BASEADDR, i2cStatusBusBusy)) + { + /* Reset i2c transfer state. */ + i2cState.operateDir = i2cDirectionReceive; + i2cState.isBusy = false; + return false; + } + + /* Set I2C work under Tx mode */ + I2C_SetDirMode(BOARD_I2C_BASEADDR, i2cDirectionTransmit); + i2cState.currentDir = i2cDirectionTransmit; + + /* Switch to Master Mode and Send Start Signal. */ + I2C_SetWorkMode(BOARD_I2C_BASEADDR, i2cModeMaster); + i2cState.currentMode = i2cModeMaster; + + /* Is there command to be sent before receive data? */ + if (0 != i2cState.cmdSize) + { + if (1 == i2cState.cmdSize) + I2C_SendRepeatStart(BOARD_I2C_BASEADDR); + I2C_WriteByte(BOARD_I2C_BASEADDR, *i2cState.cmdBuff); + i2cState.cmdBuff++; + i2cState.cmdSize--; + } + else + { + /* Change to receive state. */ + I2C_SetDirMode(BOARD_I2C_BASEADDR, i2cDirectionReceive); + i2cState.currentDir = i2cDirectionReceive; + + if (1 == rxSize) + /* Send Nack */ + I2C_SetAckBit(BOARD_I2C_BASEADDR, false); + else + /* Send Ack */ + I2C_SetAckBit(BOARD_I2C_BASEADDR, true); + /* dummy read to clock in 1st byte */ + I2C_ReadByte(BOARD_I2C_BASEADDR); + } + + /* Enable I2C interrupt, subsequent data transfer will be handled in ISR. */ + I2C_SetIntCmd(BOARD_I2C_BASEADDR, true); + + return true; +} + +static bool I2C_XFER_IsBusy(void) +{ + return i2cState.isBusy; +} + +void BOARD_I2C_HANDLER(void) +{ + /* Clear interrupt flag. */ + I2C_ClearStatusFlag(BOARD_I2C_BASEADDR, i2cStatusInterrupt); + + /* Exit the ISR if no transfer is happening for this instance. */ + if (!i2cState.isBusy) + return; + + if (i2cModeMaster == i2cState.currentMode) + { + if (i2cDirectionTransmit == i2cState.currentDir) + { + if ((I2C_GetStatusFlag(BOARD_I2C_BASEADDR, i2cStatusReceivedAck)) || + ((0 == i2cState.txSize) && (0 == i2cState.cmdSize))) + { + if ((i2cDirectionTransmit == i2cState.operateDir) || + (I2C_GetStatusFlag(BOARD_I2C_BASEADDR, i2cStatusReceivedAck))) + { + /* Switch to Slave mode and Generate a Stop Signal. */ + I2C_SetWorkMode(BOARD_I2C_BASEADDR, i2cModeSlave); + i2cState.currentMode = i2cModeSlave; + + /* Switch back to Rx direction. */ + I2C_SetDirMode(BOARD_I2C_BASEADDR, i2cDirectionReceive); + i2cState.currentDir = i2cDirectionReceive; + + /* Close I2C interrupt. */ + I2C_SetIntCmd(BOARD_I2C_BASEADDR, false); + /* Release I2C Bus. */ + i2cState.isBusy = false; + } + else + { + /* Switch back to Rx direction. */ + I2C_SetDirMode(BOARD_I2C_BASEADDR, i2cDirectionReceive); + i2cState.currentDir = i2cDirectionReceive; + + if (1 == i2cState.rxSize) + /* Send Nack */ + I2C_SetAckBit(BOARD_I2C_BASEADDR, false); + else + /* Send Ack */ + I2C_SetAckBit(BOARD_I2C_BASEADDR, true); + /* dummy read to clock in 1st byte */ + *i2cState.rxBuff = I2C_ReadByte(BOARD_I2C_BASEADDR); + } + } + else + { + if (0 != i2cState.cmdSize) + { + if ((1 == i2cState.cmdSize) && (i2cDirectionReceive == i2cState.operateDir)) + I2C_SendRepeatStart(BOARD_I2C_BASEADDR); + I2C_WriteByte(BOARD_I2C_BASEADDR, *i2cState.cmdBuff); + i2cState.cmdBuff++; + i2cState.cmdSize--; + } + else + { + I2C_WriteByte(BOARD_I2C_BASEADDR, *i2cState.txBuff); + i2cState.txBuff++; + i2cState.txSize--; + } + } + } + else + { + /* Normal read operation. */ + if (2 == i2cState.rxSize) + /* Send Nack */ + I2C_SetAckBit(BOARD_I2C_BASEADDR, false); + else + /* Send Nack */ + I2C_SetAckBit(BOARD_I2C_BASEADDR, true); + + if (1 == i2cState.rxSize) + { + /* Switch back to Tx direction to avoid additional I2C bus read. */ + I2C_SetDirMode(BOARD_I2C_BASEADDR, i2cDirectionTransmit); + i2cState.currentDir = i2cDirectionTransmit; + } + *i2cState.rxBuff = I2C_ReadByte(BOARD_I2C_BASEADDR); + i2cState.rxBuff++; + i2cState.rxSize--; + + /* receive finished. */ + if (0 == i2cState.rxSize) + { + /* Switch to Slave mode and Generate a Stop Signal. */ + I2C_SetWorkMode(BOARD_I2C_BASEADDR, i2cModeSlave); + i2cState.currentMode = i2cModeSlave; + + /* Switch back to Rx direction. */ + I2C_SetDirMode(BOARD_I2C_BASEADDR, i2cDirectionReceive); + i2cState.currentDir = i2cDirectionReceive; + + /* Close I2C interrupt. */ + I2C_SetIntCmd(BOARD_I2C_BASEADDR, false); + /* Release I2C Bus. */ + i2cState.isBusy = false; + } + } + } +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/CMakeLists.txt b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/CMakeLists.txt new file mode 100644 index 0000000..82ecfcc --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/CMakeLists.txt @@ -0,0 +1,130 @@ +INCLUDE(CMakeForceCompiler) + +# CROSS COMPILER SETTING +SET(CMAKE_SYSTEM_NAME Generic) +CMAKE_MINIMUM_REQUIRED (VERSION 2.6) + +# THE VERSION NUMBER +SET (Tutorial_VERSION_MAJOR 1) +SET (Tutorial_VERSION_MINOR 0) + +# ENABLE ASM +ENABLE_LANGUAGE(ASM) + +SET(CMAKE_STATIC_LIBRARY_PREFIX) +SET(CMAKE_STATIC_LIBRARY_SUFFIX) + +SET(CMAKE_EXECUTABLE_LIBRARY_PREFIX) +SET(CMAKE_EXECUTABLE_LIBRARY_SUFFIX) + + +# CURRENT DIRECTORY +SET(ProjDirPath ${CMAKE_CURRENT_SOURCE_DIR}) + +# DEBUG LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -T${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# RELEASE LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -T${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# DEBUG ASM FLAGS +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG C FLAGS +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# RELEASE ASM FLAGS +SET(CMAKE_ASM_FLAGS_RELEASE "${CMAKE_ASM_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE C FLAGS +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# ASM MACRO +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -D__DEBUG") + +# C MACRO +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__DEBUG") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCPU_IMX7D_M4") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D__NDEBUG") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DCPU_IMX7D_M4") + +# CXX MACRO + +# INCLUDE_DIRECTORIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(uart_imx_interrupt_example + "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../../platform/utilities/src/debug_console_imx.c" + "${ProjDirPath}/../../../../../../platform/utilities/inc/debug_console_imx.h" + "${ProjDirPath}/../../../../../../platform/utilities/src/print_scan.c" + "${ProjDirPath}/../../../../../../platform/utilities/src/print_scan.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/ccm_analog_imx7d.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/ccm_imx7d.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/rdc.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/rdc_defs_imx7d.h" + "${ProjDirPath}/../../../../../../platform/drivers/inc/wdog_imx.h" + "${ProjDirPath}/../../../../../../platform/drivers/src/ccm_analog_imx7d.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/ccm_imx7d.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/rdc.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/wdog_imx.c" + "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c" + "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.h" + "${ProjDirPath}/../../../../pin_mux.c" + "${ProjDirPath}/../../../../pin_mux.h" + "${ProjDirPath}/../../../../board.c" + "${ProjDirPath}/../../../../board.h" + "${ProjDirPath}/../../../../clock_freq.c" + "${ProjDirPath}/../../../../clock_freq.h" + "${ProjDirPath}/../hardware_init.c" + "${ProjDirPath}/../main.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/uart_imx.c" + "${ProjDirPath}/../../../../../../platform/drivers/inc/uart_imx.h" +) +SET_TARGET_PROPERTIES(uart_imx_interrupt_example PROPERTIES OUTPUT_NAME "uart_imx_interrupt_example.elf") + +TARGET_LINK_LIBRARIES(uart_imx_interrupt_example -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(uart_imx_interrupt_example m) +TARGET_LINK_LIBRARIES(uart_imx_interrupt_example c) +TARGET_LINK_LIBRARIES(uart_imx_interrupt_example gcc) +TARGET_LINK_LIBRARIES(uart_imx_interrupt_example nosys) +TARGET_LINK_LIBRARIES(uart_imx_interrupt_example -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/uart_imx_interrupt_example.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/uart_imx_interrupt_example.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET uart_imx_interrupt_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/uart_imx_interrupt_example.elf ${EXECUTABLE_OUTPUT_PATH}/uart_imx_interrupt_example.hex) +ADD_CUSTOM_COMMAND(TARGET uart_imx_interrupt_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/uart_imx_interrupt_example.elf ${EXECUTABLE_OUTPUT_PATH}/uart_imx_interrupt_example.bin) diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_all.bat b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_all.bat new file mode 100755 index 0000000..0cf721f --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_all.bat @@ -0,0 +1,5 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_all.sh b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_all.sh new file mode 100755 index 0000000..3827529 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_all.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_debug.bat b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_debug.bat new file mode 100755 index 0000000..e9ccfdd --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_debug.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_debug.sh b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_debug.sh new file mode 100755 index 0000000..effd076 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_debug.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_release.bat b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_release.bat new file mode 100755 index 0000000..0759349 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_release.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_release.sh b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_release.sh new file mode 100755 index 0000000..a12067d --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_release.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/clean.bat b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/clean.bat @@ -0,0 +1,3 @@ +RD /s /Q Debug Release CMakeFiles +DEL /s /Q /F Makefile cmake_install.cmake CMakeCache.txt +pause diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/clean.sh b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/armgcc/clean.sh @@ -0,0 +1,3 @@ +#!/bin/sh +rm -rf debug release CMakeFiles +rm -rf Makefile cmake_install.cmake CMakeCache.txt diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/ds5/.cproject b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/ds5/.cproject new file mode 100644 index 0000000..01e8f9e --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/ds5/.project b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/ds5/.project new file mode 100644 index 0000000..31063be --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/ds5/.project @@ -0,0 +1,86 @@ + + + uart_imx_interrupt_example_imx7d_val_m4 + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.autoBuildTarget + all + + + org.eclipse.cdt.make.core.buildArguments + + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.buildLocation + + + + org.eclipse.cdt.make.core.cleanBuildTarget + clean + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.fullBuildTarget + all + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + startup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sutilities2virtual:/virtualutilities/debug_console_imx.c1PARENT-6-PROJECT_LOC/platform/utilities/src/debug_console_imx.cutilities2virtual:/virtualutilities/debug_console_imx.h1PARENT-6-PROJECT_LOC/platform/utilities/inc/debug_console_imx.hutilities2virtual:/virtualutilities/print_scan.c1PARENT-6-PROJECT_LOC/platform/utilities/src/print_scan.cutilities2virtual:/virtualutilities/print_scan.h1PARENT-6-PROJECT_LOC/platform/utilities/src/print_scan.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/ccm_analog_imx7d.hsystem2virtual:/virtualsystem/ccm_imx7d.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/ccm_imx7d.hsystem2virtual:/virtualsystem/rdc.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/rdc.hsystem2virtual:/virtualsystem/rdc_defs_imx7d.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/rdc_defs_imx7d.hsystem2virtual:/virtualsystem/wdog_imx.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/wdog_imx.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.c1PARENT-6-PROJECT_LOC/platform/drivers/src/ccm_analog_imx7d.csystem2virtual:/virtualsystem/ccm_imx7d.c1PARENT-6-PROJECT_LOC/platform/drivers/src/ccm_imx7d.csystem2virtual:/virtualsystem/rdc.c1PARENT-6-PROJECT_LOC/platform/drivers/src/rdc.csystem2virtual:/virtualsystem/wdog_imx.c1PARENT-6-PROJECT_LOC/platform/drivers/src/wdog_imx.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.c1PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.h1PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hboard2virtual:/virtualboard/pin_mux.c1PARENT-4-PROJECT_LOC/pin_mux.cboard2virtual:/virtualboard/pin_mux.h1PARENT-4-PROJECT_LOC/pin_mux.hboard2virtual:/virtualboard/board.c1PARENT-4-PROJECT_LOC/board.cboard2virtual:/virtualboard/board.h1PARENT-4-PROJECT_LOC/board.hboard2virtual:/virtualboard/clock_freq.c1PARENT-4-PROJECT_LOC/clock_freq.cboard2virtual:/virtualboard/clock_freq.h1PARENT-4-PROJECT_LOC/clock_freq.hboard2virtual:/virtualboard/hardware_init.c1PARENT-1-PROJECT_LOC/hardware_init.csource2virtual:/virtualsource/main.c1PARENT-1-PROJECT_LOC/main.cdriver2virtual:/virtualdriver/uart_imx.c1PARENT-6-PROJECT_LOC/platform/drivers/src/uart_imx.cdriver2virtual:/virtualdriver/uart_imx.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/uart_imx.h + + + diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/ds5/makedir.bat b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/ds5/uart_imx_interrupt_example.wsd b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/ds5/uart_imx_interrupt_example.wsd new file mode 100644 index 0000000..2f7a3da --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/ds5/uart_imx_interrupt_example.wsd @@ -0,0 +1,9 @@ + + + + uart_imx_interrupt_example_imx7d_val_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/hardware_init.c b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/hardware_init.c new file mode 100644 index 0000000..b9efeaf --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/hardware_init.c @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "board.h" +#include "pin_mux.h" + +void hardware_init(void) +{ + /* Board specific RDC settings */ + BOARD_RdcInit(); + + /* In this example, we need to grasp board debug uart exclusively */ + RDC_SetPdapAccess(RDC, BOARD_DEBUG_UART_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false); + + /* Board specific clock settings */ + BOARD_ClockInit(); + + /* Select board debug clock derived from OSC clock(24M) */ + CCM_UpdateRoot(CCM, BOARD_DEBUG_UART_CCM_ROOT, ccmRootmuxUartOsc24m, 0, 0); + /* Enable debug uart clock */ + CCM_EnableRoot(CCM, BOARD_DEBUG_UART_CCM_ROOT); + CCM_ControlGate(CCM, BOARD_DEBUG_UART_CCM_CCGR, ccmClockNeededRunWait); + + /* UART Pin setting */ + configure_uart_pins(BOARD_DEBUG_UART_BASEADDR); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.ewd b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.ewd @@ -0,0 +1,9419 @@ + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Ram Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.ewp b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.ewp new file mode 100644 index 0000000..e481dee --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.ewp @@ -0,0 +1,1891 @@ + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + + + + +startup$PROJ_DIR$/../../../../../../platform/devices/MCIMX7D/startup/iar/startup_MCIMX7D_M4.s$PROJ_DIR$/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c$PROJ_DIR$/../../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hutilities$PROJ_DIR$/../../../../../../platform/utilities/src/debug_console_imx.c$PROJ_DIR$/../../../../../../platform/utilities/inc/debug_console_imx.h$PROJ_DIR$/../../../../../../platform/utilities/src/print_scan.c$PROJ_DIR$/../../../../../../platform/utilities/src/print_scan.hsystem$PROJ_DIR$/../../../../../../platform/drivers/inc/ccm_analog_imx7d.h$PROJ_DIR$/../../../../../../platform/drivers/inc/ccm_imx7d.h$PROJ_DIR$/../../../../../../platform/drivers/inc/rdc.h$PROJ_DIR$/../../../../../../platform/drivers/inc/rdc_defs_imx7d.h$PROJ_DIR$/../../../../../../platform/drivers/inc/wdog_imx.h$PROJ_DIR$/../../../../../../platform/drivers/src/ccm_analog_imx7d.c$PROJ_DIR$/../../../../../../platform/drivers/src/ccm_imx7d.c$PROJ_DIR$/../../../../../../platform/drivers/src/rdc.c$PROJ_DIR$/../../../../../../platform/drivers/src/wdog_imx.cboard$PROJ_DIR$/../../../../pin_mux.c$PROJ_DIR$/../../../../pin_mux.h$PROJ_DIR$/../../../../board.c$PROJ_DIR$/../../../../board.h$PROJ_DIR$/../../../../clock_freq.c$PROJ_DIR$/../../../../clock_freq.h$PROJ_DIR$/../hardware_init.csource$PROJ_DIR$/../main.cdriver$PROJ_DIR$/../../../../../../platform/drivers/src/uart_imx.c$PROJ_DIR$/../../../../../../platform/drivers/inc/uart_imx.h diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.eww b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.eww new file mode 100644 index 0000000..479e121 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.eww @@ -0,0 +1,4 @@ + + +alluart_imx_interrupt_exampleReleaseuart_imx_interrupt_exampleDebugReleaseuart_imx_interrupt_exampleReleaseDebuguart_imx_interrupt_exampleDebug +$WS_DIR$/uart_imx_interrupt_example.ewp diff --git a/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/main.c b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/main.c new file mode 100644 index 0000000..5cef7aa --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/uart_imx/uart_interrupt/main.c @@ -0,0 +1,218 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include "uart_imx.h" +#include "board.h" + +typedef struct _uart_state { + const uint8_t* txBuff; /*!< The buffer of data being sent.*/ + uint8_t* rxBuff; /*!< The buffer of received data. */ + volatile uint32_t txSize; /*!< The remaining number of bytes to be transmitted. */ + volatile uint32_t rxSize; /*!< The remaining number of bytes to be received. */ + volatile bool isTxBusy; /*!< True if there is an active transmit. */ + volatile bool isRxBusy; /*!< True if there is an active receive. */ +} uart_state_t; + +const uint8_t buffStart[] = "\n\r++++++++++++++++ UART Send/Receive Interrupt Driven Example +++++++++++++++++\n\r"; +const uint8_t bufferData[] = "\n\rType characters from keyboard, the board will receive and then echo them to terminal screen\n\r"; + +/* Uart runtime state structure */ +static uart_state_t uartState; + +static void UART_XFER_Config(uart_init_config_t* initConfig); +static bool UART_XFER_Write(uint8_t* txBuffer, uint32_t length); +static uint32_t UART_XFER_GetWriteStatus(void); +static bool UART_XFER_Read(uint8_t* rxBuffer, uint32_t length); +static uint32_t UART_XFER_GetReadStatus(void); + +int main(void) +{ + uint8_t rxChar, txChar; + + // Setup UART init structure. + uart_init_config_t uart_init_str = { + .clockRate = get_uart_clock_freq(BOARD_DEBUG_UART_BASEADDR), + .baudRate = 115200u, + .wordLength = uartWordLength8Bits, + .stopBitNum = uartStopBitNumOne, + .parity = uartParityDisable, + .direction = uartDirectionTxRx + }; + + // Initialize board specified hardware. + hardware_init(); + // Initialize the uart module with initialize structure. + UART_XFER_Config(&uart_init_str); + + // Inform to start non blocking example. + UART_XFER_Write((uint8_t*)buffStart, sizeof(buffStart)); + // Wait until transmission is finished. + while (UART_XFER_GetWriteStatus()); + + // Inform user of what to do + UART_XFER_Write((uint8_t*)bufferData, sizeof(bufferData)); + // Wait until transmission is finished. + while (UART_XFER_GetWriteStatus()); + + while (true) + { + // Call received API + UART_XFER_Read(&rxChar, 1u); + + // Wait until we receive a character + while (UART_XFER_GetReadStatus()); + + // Echo received character + txChar = rxChar; + UART_XFER_Write(&txChar, 1u); + } +} + +static void UART_XFER_Config(uart_init_config_t* initConfig) +{ + /* Assert */ + + /* Initialize UART state structure content. */ + uartState.txBuff = 0; + uartState.rxBuff = 0; + uartState.txSize = 0; + uartState.rxSize = 0; + uartState.isTxBusy = false; + uartState.isRxBusy = false; + + /* Initialize UART baud rate, bit count, parity, stop bit and direction. */ + UART_Init(BOARD_DEBUG_UART_BASEADDR, initConfig); + + UART_SetTxFifoWatermark(BOARD_DEBUG_UART_BASEADDR, 16); + UART_SetRxFifoWatermark(BOARD_DEBUG_UART_BASEADDR, 1); + + /* Set UART Interrupt priority */ + NVIC_SetPriority(BOARD_DEBUG_UART_IRQ_NUM, 3); + + /* Call core API to enable the IRQ. */ + NVIC_EnableIRQ(BOARD_DEBUG_UART_IRQ_NUM); + + /* Finally, enable the UART module */ + UART_Enable(BOARD_DEBUG_UART_BASEADDR); +} + +static bool UART_XFER_Write(uint8_t* txBuffer, uint32_t length) +{ + if ((uartState.isTxBusy) || (0 == length)) + return false; + + uartState.txBuff = txBuffer; + uartState.txSize = length; + uartState.isTxBusy = true; + + UART_SetIntCmd(BOARD_DEBUG_UART_BASEADDR, uartIntTxReady, true); + return true; +} + +static uint32_t UART_XFER_GetWriteStatus(void) +{ + return uartState.txSize; +} + +static bool UART_XFER_Read(uint8_t* rxBuffer, uint32_t length) +{ + if ((uartState.isRxBusy) || (0 == length)) + return false; + uartState.rxBuff = rxBuffer; + uartState.rxSize = length; + uartState.isRxBusy = true; + + UART_SetIntCmd(BOARD_DEBUG_UART_BASEADDR, uartIntRxReady, true); + return true; +} + +static uint32_t UART_XFER_GetReadStatus(void) +{ + return uartState.rxSize; +} + +void BOARD_DEBUG_UART_HANDLER(void) +{ + /* Exit the ISR if no transfer is happening for this instance. */ + if ((!uartState.isTxBusy) && (!uartState.isRxBusy)) + return; + + if (UART_GetStatusFlag(BOARD_DEBUG_UART_BASEADDR, uartStatusRxReady)) + { + /* Check to see if there are any more bytes to receive. */ + if (uartState.rxSize) + { + while (UART_GetStatusFlag(BOARD_DEBUG_UART_BASEADDR, uartStatusRxReady)) + { + *(uartState.rxBuff) = (uint8_t)UART_Getchar(BOARD_DEBUG_UART_BASEADDR); + uartState.rxBuff++; + uartState.rxSize--; + if (uartState.rxSize == 0U) + { + UART_SetIntCmd(BOARD_DEBUG_UART_BASEADDR, uartIntRxReady, false); + + uartState.isRxBusy = false; + break; + } + } + } + } + + if (UART_GetStatusFlag(BOARD_DEBUG_UART_BASEADDR, uartStatusTxReady)) + { + /* Check to see if there are any more bytes to send. */ + if (uartState.txSize) + { + while (UART_GetStatusFlag(BOARD_DEBUG_UART_BASEADDR, uartStatusTxReady)) + { + /* Transmit data and update tx size/buff */ + UART_Putchar(BOARD_DEBUG_UART_BASEADDR, *(uartState.txBuff)); + uartState.txBuff++; + uartState.txSize--; + if (uartState.txSize == 0U) + { + /* Transmit complete */ + /* Disable the transmitter ready interrupt */ + UART_SetIntCmd(BOARD_DEBUG_UART_BASEADDR, uartIntTxReady, false); + + /* Update the information of the module driver state */ + uartState.isTxBusy = false; + break; + } + } + } + } +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/CMakeLists.txt b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/CMakeLists.txt new file mode 100644 index 0000000..3e9f4f0 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/CMakeLists.txt @@ -0,0 +1,130 @@ +INCLUDE(CMakeForceCompiler) + +# CROSS COMPILER SETTING +SET(CMAKE_SYSTEM_NAME Generic) +CMAKE_MINIMUM_REQUIRED (VERSION 2.6) + +# THE VERSION NUMBER +SET (Tutorial_VERSION_MAJOR 1) +SET (Tutorial_VERSION_MINOR 0) + +# ENABLE ASM +ENABLE_LANGUAGE(ASM) + +SET(CMAKE_STATIC_LIBRARY_PREFIX) +SET(CMAKE_STATIC_LIBRARY_SUFFIX) + +SET(CMAKE_EXECUTABLE_LIBRARY_PREFIX) +SET(CMAKE_EXECUTABLE_LIBRARY_SUFFIX) + + +# CURRENT DIRECTORY +SET(ProjDirPath ${CMAKE_CURRENT_SOURCE_DIR}) + +# DEBUG LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -T${ProjDirPath}/../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# RELEASE LINK FILE +set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -T${ProjDirPath}/../../../../../platform/devices/MCIMX7D/linker/gcc/MCIMX7D_M4_tcm.ld -static") + +# DEBUG ASM FLAGS +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG C FLAGS +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# DEBUG LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -g -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# RELEASE ASM FLAGS +SET(CMAKE_ASM_FLAGS_RELEASE "${CMAKE_ASM_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE C FLAGS +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mthumb -MMD -MP -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mapcs -std=gnu99") + +# RELEASE LD FLAGS +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 --specs=nano.specs -lm -Wall -fno-common -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -Os -mthumb -mapcs -Xlinker --gc-sections -Xlinker -static -Xlinker -z -Xlinker muldefs -Xlinker --defsym=__stack_size__=0x400 -Xlinker --defsym=__heap_size__=0x200") + +# ASM MACRO +SET(CMAKE_ASM_FLAGS_DEBUG "${CMAKE_ASM_FLAGS_DEBUG} -D__DEBUG") + +# C MACRO +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__DEBUG") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DCPU_IMX7D_M4") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D__NDEBUG") +SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DCPU_IMX7D_M4") + +# CXX MACRO + +# INCLUDE_DIRECTORIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/CMSIS/Include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices/MCIMX7D/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/drivers/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(wdog_imx_example + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../platform/utilities/src/debug_console_imx.c" + "${ProjDirPath}/../../../../../platform/utilities/inc/debug_console_imx.h" + "${ProjDirPath}/../../../../../platform/utilities/src/print_scan.c" + "${ProjDirPath}/../../../../../platform/utilities/src/print_scan.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/ccm_analog_imx7d.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/ccm_imx7d.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/rdc.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/rdc_defs_imx7d.h" + "${ProjDirPath}/../../../../../platform/drivers/inc/wdog_imx.h" + "${ProjDirPath}/../../../../../platform/drivers/src/ccm_analog_imx7d.c" + "${ProjDirPath}/../../../../../platform/drivers/src/ccm_imx7d.c" + "${ProjDirPath}/../../../../../platform/drivers/src/rdc.c" + "${ProjDirPath}/../../../../../platform/drivers/src/wdog_imx.c" + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c" + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.h" + "${ProjDirPath}/../../../pin_mux.c" + "${ProjDirPath}/../../../pin_mux.h" + "${ProjDirPath}/../../../board.c" + "${ProjDirPath}/../../../board.h" + "${ProjDirPath}/../../../clock_freq.c" + "${ProjDirPath}/../../../clock_freq.h" + "${ProjDirPath}/../hardware_init.c" + "${ProjDirPath}/../main.c" + "${ProjDirPath}/../../../../../platform/drivers/src/uart_imx.c" + "${ProjDirPath}/../../../../../platform/drivers/inc/uart_imx.h" +) +SET_TARGET_PROPERTIES(wdog_imx_example PROPERTIES OUTPUT_NAME "wdog_imx_example.elf") + +TARGET_LINK_LIBRARIES(wdog_imx_example -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(wdog_imx_example m) +TARGET_LINK_LIBRARIES(wdog_imx_example c) +TARGET_LINK_LIBRARIES(wdog_imx_example gcc) +TARGET_LINK_LIBRARIES(wdog_imx_example nosys) +TARGET_LINK_LIBRARIES(wdog_imx_example -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/wdog_imx_example.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/wdog_imx_example.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET wdog_imx_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/wdog_imx_example.elf ${EXECUTABLE_OUTPUT_PATH}/wdog_imx_example.hex) +ADD_CUSTOM_COMMAND(TARGET wdog_imx_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/wdog_imx_example.elf ${EXECUTABLE_OUTPUT_PATH}/wdog_imx_example.bin) diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_all.bat b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_all.bat new file mode 100755 index 0000000..6d41d86 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_all.bat @@ -0,0 +1,5 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_all.sh b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_all.sh new file mode 100755 index 0000000..ebb0c25 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_all.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_debug.bat b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_debug.bat new file mode 100755 index 0000000..bf3b902 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_debug.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_debug.sh b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_debug.sh new file mode 100755 index 0000000..571868b --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_debug.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_release.bat b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_release.bat new file mode 100755 index 0000000..e229a83 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_release.bat @@ -0,0 +1,3 @@ +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release . +mingw32-make -j4 +pause diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_release.sh b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_release.sh new file mode 100755 index 0000000..035ce4e --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/build_release.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cmake -DCMAKE_TOOLCHAIN_FILE="../../../../../tools/cmake_toolchain_files/armgcc.cmake" -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release . +make -j4 diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/clean.bat b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/clean.bat @@ -0,0 +1,3 @@ +RD /s /Q Debug Release CMakeFiles +DEL /s /Q /F Makefile cmake_install.cmake CMakeCache.txt +pause diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/clean.sh b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/armgcc/clean.sh @@ -0,0 +1,3 @@ +#!/bin/sh +rm -rf debug release CMakeFiles +rm -rf Makefile cmake_install.cmake CMakeCache.txt diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/ds5/.cproject b/examples/imx7d_val_m4/driver_examples/wdog_imx/ds5/.cproject new file mode 100644 index 0000000..fead39f --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/ds5/.project b/examples/imx7d_val_m4/driver_examples/wdog_imx/ds5/.project new file mode 100644 index 0000000..7c07b11 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/ds5/.project @@ -0,0 +1,86 @@ + + + wdog_imx_example_imx7d_val_m4 + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + ?name? + + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.autoBuildTarget + all + + + org.eclipse.cdt.make.core.buildArguments + + + + org.eclipse.cdt.make.core.buildCommand + make + + + org.eclipse.cdt.make.core.buildLocation + + + + org.eclipse.cdt.make.core.cleanBuildTarget + clean + + + org.eclipse.cdt.make.core.contents + org.eclipse.cdt.make.core.activeConfigSettings + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.fullBuildTarget + all + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + startup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sutilities2virtual:/virtualutilities/debug_console_imx.c1PARENT-5-PROJECT_LOC/platform/utilities/src/debug_console_imx.cutilities2virtual:/virtualutilities/debug_console_imx.h1PARENT-5-PROJECT_LOC/platform/utilities/inc/debug_console_imx.hutilities2virtual:/virtualutilities/print_scan.c1PARENT-5-PROJECT_LOC/platform/utilities/src/print_scan.cutilities2virtual:/virtualutilities/print_scan.h1PARENT-5-PROJECT_LOC/platform/utilities/src/print_scan.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/ccm_analog_imx7d.hsystem2virtual:/virtualsystem/ccm_imx7d.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/ccm_imx7d.hsystem2virtual:/virtualsystem/rdc.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/rdc.hsystem2virtual:/virtualsystem/rdc_defs_imx7d.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/rdc_defs_imx7d.hsystem2virtual:/virtualsystem/wdog_imx.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/wdog_imx.hsystem2virtual:/virtualsystem/ccm_analog_imx7d.c1PARENT-5-PROJECT_LOC/platform/drivers/src/ccm_analog_imx7d.csystem2virtual:/virtualsystem/ccm_imx7d.c1PARENT-5-PROJECT_LOC/platform/drivers/src/ccm_imx7d.csystem2virtual:/virtualsystem/rdc.c1PARENT-5-PROJECT_LOC/platform/drivers/src/rdc.csystem2virtual:/virtualsystem/wdog_imx.c1PARENT-5-PROJECT_LOC/platform/drivers/src/wdog_imx.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.c1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.cstartup2virtual:/virtualstartup/system_MCIMX7D_M4.h1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hboard2virtual:/virtualboard/pin_mux.c1PARENT-3-PROJECT_LOC/pin_mux.cboard2virtual:/virtualboard/pin_mux.h1PARENT-3-PROJECT_LOC/pin_mux.hboard2virtual:/virtualboard/board.c1PARENT-3-PROJECT_LOC/board.cboard2virtual:/virtualboard/board.h1PARENT-3-PROJECT_LOC/board.hboard2virtual:/virtualboard/clock_freq.c1PARENT-3-PROJECT_LOC/clock_freq.cboard2virtual:/virtualboard/clock_freq.h1PARENT-3-PROJECT_LOC/clock_freq.hboard2virtual:/virtualboard/hardware_init.c1PARENT-1-PROJECT_LOC/hardware_init.csource2virtual:/virtualsource/main.c1PARENT-1-PROJECT_LOC/main.cdriver2virtual:/virtualdriver/uart_imx.c1PARENT-5-PROJECT_LOC/platform/drivers/src/uart_imx.cdriver2virtual:/virtualdriver/uart_imx.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/uart_imx.h + + + diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/ds5/makedir.bat b/examples/imx7d_val_m4/driver_examples/wdog_imx/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/ds5/wdog_imx_example.wsd b/examples/imx7d_val_m4/driver_examples/wdog_imx/ds5/wdog_imx_example.wsd new file mode 100644 index 0000000..4caf8db --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/ds5/wdog_imx_example.wsd @@ -0,0 +1,9 @@ + + + + wdog_imx_example_imx7d_val_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/hardware_init.c b/examples/imx7d_val_m4/driver_examples/wdog_imx/hardware_init.c new file mode 100644 index 0000000..8f0d50f --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/hardware_init.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "board.h" +#include "pin_mux.h" + +void hardware_init(void) +{ + /* Board specific RDC settings */ + BOARD_RdcInit(); + + /* Board specific clock settings */ + BOARD_ClockInit(); + + /* initialize debug uart */ + dbg_uart_init(); + + /* In this example, we need to grasp board WDOG exclusively */ + RDC_SetPdapAccess(RDC, BOARD_WDOG_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false); + + /* Enable clock used by peripherals */ + CCM_EnableRoot(CCM, BOARD_WDOG_CCM_ROOT); + CCM_ControlGate(CCM, BOARD_WDOG_CCM_CCGR, ccmClockNeededRunWait); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/iar/wdog_imx_example.ewd b/examples/imx7d_val_m4/driver_examples/wdog_imx/iar/wdog_imx_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/iar/wdog_imx_example.ewd @@ -0,0 +1,9419 @@ + + + 2 + + Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash SramData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Flash DDRData Release + + ARM + + 0 + + C-SPY + 2 + + 26 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 0 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 0 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 0 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 0 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 0 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + + Int Ram Debug + + ARM + + 1 + + C-SPY + 2 + + 26 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARMSIM_ID + 2 + + 1 + 1 + 1 + + + + + + + + ANGEL_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + + CMSISDAP_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GDBSERVER_ID + 2 + + 0 + 1 + 1 + + + + + + + + + + + IARROM_ID + 2 + + 1 + 1 + 1 + + + + + + + + + IJET_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + JLINK_ID + 2 + + 15 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LMIFTDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + MACRAIGOR_ID + 2 + + 3 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + PEMICRO_ID + 2 + + 1 + 1 + 1 + + + + + + + + + + + + + + + + + + + RDI_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + + + + STLINK_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + THIRDPARTY_ID + 2 + + 0 + 1 + 1 + + + + + + + + XDS100_ID + 2 + + 2 + 1 + 1 + + + + + + + + + + + + + $TOOLKIT_DIR$\plugins\middleware\HCCWare\HCCWare.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\AVIX\AVIX.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\CMX\CmxTinyArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\MQX\MQXRtosPlugin.ewplugin + 1 + + + $TOOLKIT_DIR$\plugins\rtos\OpenRTOS\OpenRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\SafeRTOS\SafeRTOSPlugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\ThreadX\ThreadXArmPlugin.ENU.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\TI-RTOS\tirtosplugin.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-286-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-II\uCOS-II-KA-CSpy.ewplugin + 0 + + + $TOOLKIT_DIR$\plugins\rtos\uCOS-III\uCOS-III-KA-CSpy.ewplugin + 0 + + + $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin + 0 + + + $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin + 1 + + + $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin + 0 + + + + diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/iar/wdog_imx_example.ewp b/examples/imx7d_val_m4/driver_examples/wdog_imx/iar/wdog_imx_example.ewp new file mode 100644 index 0000000..27da58b --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/iar/wdog_imx_example.ewp @@ -0,0 +1,1891 @@ + + + 2 + + Debug + + ARM + + 1 + + General + 3 + + 22 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 1 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 1 + + + + + + + BILINK + 0 + + + + + Release + + ARM + + 0 + + General + 3 + + 22 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ICCARM + 2 + + 31 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AARM + 2 + + 9 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OBJCOPY + 0 + + 1 + 1 + 0 + + + + + + + + + CUSTOM + 3 + + + + + + + BICOMP + 0 + + + + BUILDACTION + 1 + + + + + + + ILINK + 0 + + 16 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IARCHIVE + 0 + + 0 + 1 + 0 + + + + + + + BILINK + 0 + + + + + + + + +startup$PROJ_DIR$/../../../../../platform/devices/MCIMX7D/startup/iar/startup_MCIMX7D_M4.s$PROJ_DIR$/../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.c$PROJ_DIR$/../../../../../platform/devices/MCIMX7D/startup/system_MCIMX7D_M4.hutilities$PROJ_DIR$/../../../../../platform/utilities/src/debug_console_imx.c$PROJ_DIR$/../../../../../platform/utilities/inc/debug_console_imx.h$PROJ_DIR$/../../../../../platform/utilities/src/print_scan.c$PROJ_DIR$/../../../../../platform/utilities/src/print_scan.hsystem$PROJ_DIR$/../../../../../platform/drivers/inc/ccm_analog_imx7d.h$PROJ_DIR$/../../../../../platform/drivers/inc/ccm_imx7d.h$PROJ_DIR$/../../../../../platform/drivers/inc/rdc.h$PROJ_DIR$/../../../../../platform/drivers/inc/rdc_defs_imx7d.h$PROJ_DIR$/../../../../../platform/drivers/inc/wdog_imx.h$PROJ_DIR$/../../../../../platform/drivers/src/ccm_analog_imx7d.c$PROJ_DIR$/../../../../../platform/drivers/src/ccm_imx7d.c$PROJ_DIR$/../../../../../platform/drivers/src/rdc.c$PROJ_DIR$/../../../../../platform/drivers/src/wdog_imx.cboard$PROJ_DIR$/../../../pin_mux.c$PROJ_DIR$/../../../pin_mux.h$PROJ_DIR$/../../../board.c$PROJ_DIR$/../../../board.h$PROJ_DIR$/../../../clock_freq.c$PROJ_DIR$/../../../clock_freq.h$PROJ_DIR$/../hardware_init.csource$PROJ_DIR$/../main.cdriver$PROJ_DIR$/../../../../../platform/drivers/src/uart_imx.c$PROJ_DIR$/../../../../../platform/drivers/inc/uart_imx.h diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/iar/wdog_imx_example.eww b/examples/imx7d_val_m4/driver_examples/wdog_imx/iar/wdog_imx_example.eww new file mode 100644 index 0000000..d58e53d --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/iar/wdog_imx_example.eww @@ -0,0 +1,4 @@ + + +allwdog_imx_exampleReleasewdog_imx_exampleDebugReleasewdog_imx_exampleReleaseDebugwdog_imx_exampleDebug +$WS_DIR$/wdog_imx_example.ewp diff --git a/examples/imx7d_val_m4/driver_examples/wdog_imx/main.c b/examples/imx7d_val_m4/driver_examples/wdog_imx/main.c new file mode 100644 index 0000000..53c0756 --- /dev/null +++ b/examples/imx7d_val_m4/driver_examples/wdog_imx/main.c @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2015, Freescale Semiconductor, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * o Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * o Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or + * other materials provided with the distribution. + * + * o Neither the name of Freescale Semiconductor, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "wdog_imx.h" +#include "board.h" +#include "debug_console_imx.h" + +/* This case will cause M4 reset after 5.5 seconds */ +static uint32_t num = 5; + +int main(void) +{ + wdog_mode_config_t config = { + .wdw = true, /*!< true: suspend in low power wait, false: not suspend */ + .wdt = true, /*!< true: assert WDOG_B when timeout, false: not assert WDOG_B */ + .wdbg = true, /*!< true: suspend in debug mode, false: not suspend */ + .wdzst = true /*!< true: suspend in doze and stop mode, false: not suspend */ + }; + + hardware_init(); + + WDOG_Init(BOARD_WDOG_BASEADDR, &config); + + /* Enable WDOG interrupt 0.5 second before WDOG timeout */ + NVIC_SetPriority(BOARD_WDOG_IRQ_NUM, 3); + NVIC_EnableIRQ(BOARD_WDOG_IRQ_NUM); + WDOG_EnableInt(BOARD_WDOG_BASEADDR, 1); + + PRINTF("WDOG with timeout 1.5 seconds will now start\n\r"); + /* Enable WDOG with timeout 1.5 second */ + WDOG_Enable(BOARD_WDOG_BASEADDR, 2); + + while (true) + { + __WFI(); + PRINTF("WDOG was refreshed %d\n\r", num); + if (num == 0) + PRINTF("Counter down to 0, WDOG is starved now...\n\r", num); + } +} + +void BOARD_WDOG_HANDLER() +{ + WDOG_ClearStatusFlag(BOARD_WDOG_BASEADDR); + + if (--num) + WDOG_Refresh(BOARD_WDOG_BASEADDR); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ -- cgit v1.2.3