From a5ace9cb719345f2033117fa68a2d1d084e9f452 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Tue, 12 Jan 2016 14:35:24 -0800 Subject: initial commit imx7_colibri_m4 examples This adds initial examples for imx7_colibri_m4, currently just a copy of the imx7d_sdb_m4 examples. --- examples/imx7_colibri_m4/FreeRTOSConfig.h | 163 + examples/imx7_colibri_m4/board.c | 93 + examples/imx7_colibri_m4/board.h | 137 + examples/imx7_colibri_m4/clock_freq.c | 252 + examples/imx7_colibri_m4/clock_freq.h | 98 + .../blinking_imx_demo/armgcc/CMakeLists.txt | 168 + .../blinking_imx_demo/armgcc/build_all.bat | 5 + .../blinking_imx_demo/armgcc/build_all.sh | 5 + .../blinking_imx_demo/armgcc/build_debug.bat | 3 + .../blinking_imx_demo/armgcc/build_debug.sh | 3 + .../blinking_imx_demo/armgcc/build_release.bat | 3 + .../blinking_imx_demo/armgcc/build_release.sh | 3 + .../demo_apps/blinking_imx_demo/armgcc/clean.bat | 3 + .../demo_apps/blinking_imx_demo/armgcc/clean.sh | 3 + .../demo_apps/blinking_imx_demo/ds5/.cproject | 137 + .../demo_apps/blinking_imx_demo/ds5/.project | 86 + .../blinking_imx_demo/ds5/blinking_imx_demo.wsd | 9 + .../demo_apps/blinking_imx_demo/ds5/makedir.bat | 1 + .../demo_apps/blinking_imx_demo/gpio_ctrl.c | 169 + .../demo_apps/blinking_imx_demo/gpio_ctrl.h | 60 + .../demo_apps/blinking_imx_demo/gpt_timer.c | 117 + .../demo_apps/blinking_imx_demo/gpt_timer.h | 58 + .../demo_apps/blinking_imx_demo/hardware_init.c | 76 + .../blinking_imx_demo/iar/blinking_imx_demo.ewd | 9419 ++++++++++++++++++++ .../blinking_imx_demo/iar/blinking_imx_demo.ewp | 1891 ++++ .../blinking_imx_demo/iar/blinking_imx_demo.eww | 4 + .../demo_apps/blinking_imx_demo/main.c | 109 + .../demo_apps/hello_world/armgcc/CMakeLists.txt | 156 + .../demo_apps/hello_world/armgcc/build_all.bat | 5 + .../demo_apps/hello_world/armgcc/build_all.sh | 5 + .../demo_apps/hello_world/armgcc/build_debug.bat | 3 + .../demo_apps/hello_world/armgcc/build_debug.sh | 3 + .../demo_apps/hello_world/armgcc/build_release.bat | 3 + .../demo_apps/hello_world/armgcc/build_release.sh | 3 + .../demo_apps/hello_world/armgcc/clean.bat | 3 + .../demo_apps/hello_world/armgcc/clean.sh | 3 + .../demo_apps/hello_world/ds5/.cproject | 137 + .../demo_apps/hello_world/ds5/.project | 86 + .../demo_apps/hello_world/ds5/hello_world.wsd | 9 + .../demo_apps/hello_world/ds5/makedir.bat | 1 + .../demo_apps/hello_world/hardware_init.c | 48 + .../demo_apps/hello_world/iar/hello_world.ewd | 9419 ++++++++++++++++++++ .../demo_apps/hello_world/iar/hello_world.ewp | 1891 ++++ .../demo_apps/hello_world/iar/hello_world.eww | 4 + .../imx7_colibri_m4/demo_apps/hello_world/main.c | 86 + .../hello_world_qspi/armgcc/CMakeLists.txt | 156 + .../hello_world_qspi/armgcc/build_all.bat | 5 + .../demo_apps/hello_world_qspi/armgcc/build_all.sh | 5 + .../hello_world_qspi/armgcc/build_debug.bat | 3 + .../hello_world_qspi/armgcc/build_debug.sh | 3 + .../hello_world_qspi/armgcc/build_release.bat | 3 + .../hello_world_qspi/armgcc/build_release.sh | 3 + .../demo_apps/hello_world_qspi/armgcc/clean.bat | 3 + .../demo_apps/hello_world_qspi/armgcc/clean.sh | 3 + .../demo_apps/hello_world_qspi/ds5/.cproject | 137 + .../demo_apps/hello_world_qspi/ds5/.project | 86 + .../hello_world_qspi/ds5/hello_world_qspi.wsd | 9 + .../demo_apps/hello_world_qspi/ds5/makedir.bat | 1 + .../hello_world_qspi/iar/hello_world_qspi.ewd | 9419 ++++++++++++++++++++ .../hello_world_qspi/iar/hello_world_qspi.ewp | 1891 ++++ .../hello_world_qspi/iar/hello_world_qspi.eww | 4 + .../demo_apps/rpmsg/pingpong/armgcc/CMakeLists.txt | 185 + .../demo_apps/rpmsg/pingpong/armgcc/build_all.bat | 5 + .../demo_apps/rpmsg/pingpong/armgcc/build_all.sh | 5 + .../rpmsg/pingpong/armgcc/build_debug.bat | 3 + .../demo_apps/rpmsg/pingpong/armgcc/build_debug.sh | 3 + .../rpmsg/pingpong/armgcc/build_release.bat | 3 + .../rpmsg/pingpong/armgcc/build_release.sh | 3 + .../demo_apps/rpmsg/pingpong/armgcc/clean.bat | 3 + .../demo_apps/rpmsg/pingpong/armgcc/clean.sh | 3 + .../demo_apps/rpmsg/pingpong/ds5/.cproject | 137 + .../demo_apps/rpmsg/pingpong/ds5/.project | 86 + .../demo_apps/rpmsg/pingpong/ds5/makedir.bat | 1 + .../rpmsg/pingpong/ds5/rpmsg_pingpong_example.wsd | 9 + .../demo_apps/rpmsg/pingpong/hardware_init.c | 54 + .../rpmsg/pingpong/iar/rpmsg_pingpong_example.ewd | 9419 ++++++++++++++++++++ .../rpmsg/pingpong/iar/rpmsg_pingpong_example.ewp | 1891 ++++ .../rpmsg/pingpong/iar/rpmsg_pingpong_example.eww | 4 + .../demo_apps/rpmsg/pingpong/pingpong.c | 155 + .../demo_apps/rpmsg/str_echo/armgcc/CMakeLists.txt | 185 + .../demo_apps/rpmsg/str_echo/armgcc/build_all.bat | 5 + .../demo_apps/rpmsg/str_echo/armgcc/build_all.sh | 5 + .../rpmsg/str_echo/armgcc/build_debug.bat | 3 + .../demo_apps/rpmsg/str_echo/armgcc/build_debug.sh | 3 + .../rpmsg/str_echo/armgcc/build_release.bat | 3 + .../rpmsg/str_echo/armgcc/build_release.sh | 3 + .../demo_apps/rpmsg/str_echo/armgcc/clean.bat | 3 + .../demo_apps/rpmsg/str_echo/armgcc/clean.sh | 3 + .../demo_apps/rpmsg/str_echo/ds5/.cproject | 137 + .../demo_apps/rpmsg/str_echo/ds5/.project | 86 + .../demo_apps/rpmsg/str_echo/ds5/makedir.bat | 1 + .../rpmsg/str_echo/ds5/rpmsg_str_echo_example.wsd | 9 + .../demo_apps/rpmsg/str_echo/hardware_init.c | 54 + .../rpmsg/str_echo/iar/rpmsg_str_echo_example.ewd | 9419 ++++++++++++++++++++ .../rpmsg/str_echo/iar/rpmsg_str_echo_example.ewp | 1891 ++++ .../rpmsg/str_echo/iar/rpmsg_str_echo_example.eww | 4 + .../demo_apps/rpmsg/str_echo/str_echo.c | 209 + .../demo_apps/sema4_demo/armgcc/CMakeLists.txt | 160 + .../demo_apps/sema4_demo/armgcc/build_all.bat | 5 + .../demo_apps/sema4_demo/armgcc/build_all.sh | 5 + .../demo_apps/sema4_demo/armgcc/build_debug.bat | 3 + .../demo_apps/sema4_demo/armgcc/build_debug.sh | 3 + .../demo_apps/sema4_demo/armgcc/build_release.bat | 3 + .../demo_apps/sema4_demo/armgcc/build_release.sh | 3 + .../demo_apps/sema4_demo/armgcc/clean.bat | 3 + .../demo_apps/sema4_demo/armgcc/clean.sh | 3 + .../demo_apps/sema4_demo/ds5/.cproject | 137 + .../demo_apps/sema4_demo/ds5/.project | 86 + .../demo_apps/sema4_demo/ds5/makedir.bat | 1 + .../demo_apps/sema4_demo/ds5/sema4_demo.wsd | 9 + .../demo_apps/sema4_demo/hardware_init.c | 52 + .../demo_apps/sema4_demo/iar/sema4_demo.ewd | 9419 ++++++++++++++++++++ .../demo_apps/sema4_demo/iar/sema4_demo.ewp | 1891 ++++ .../demo_apps/sema4_demo/iar/sema4_demo.eww | 4 + .../imx7_colibri_m4/demo_apps/sema4_demo/main.c | 114 + .../demo_apps/sema4_demo/sema4_mutex.c | 145 + .../demo_apps/sema4_demo/sema4_mutex.h | 63 + .../demo_apps/sensor_demo/armgcc/CMakeLists.txt | 170 + .../demo_apps/sensor_demo/armgcc/build_all.bat | 5 + .../demo_apps/sensor_demo/armgcc/build_all.sh | 5 + .../demo_apps/sensor_demo/armgcc/build_debug.bat | 3 + .../demo_apps/sensor_demo/armgcc/build_debug.sh | 3 + .../demo_apps/sensor_demo/armgcc/build_release.bat | 3 + .../demo_apps/sensor_demo/armgcc/build_release.sh | 3 + .../demo_apps/sensor_demo/armgcc/clean.bat | 3 + .../demo_apps/sensor_demo/armgcc/clean.sh | 3 + .../demo_apps/sensor_demo/common/fxas21002.c | 118 + .../demo_apps/sensor_demo/common/fxas21002.h | 98 + .../demo_apps/sensor_demo/common/fxos8700.c | 158 + .../demo_apps/sensor_demo/common/fxos8700.h | 72 + .../demo_apps/sensor_demo/common/i2c_xfer.c | 326 + .../demo_apps/sensor_demo/common/i2c_xfer.h | 55 + .../demo_apps/sensor_demo/common/mma8451q.c | 185 + .../demo_apps/sensor_demo/common/mma8451q.h | 113 + .../demo_apps/sensor_demo/common/mpl3115.c | 112 + .../demo_apps/sensor_demo/common/mpl3115.h | 118 + .../demo_apps/sensor_demo/ds5/.cproject | 137 + .../demo_apps/sensor_demo/ds5/.project | 86 + .../demo_apps/sensor_demo/ds5/makedir.bat | 1 + .../demo_apps/sensor_demo/ds5/sensor_demo.wsd | 9 + .../demo_apps/sensor_demo/hardware_init.c | 60 + .../demo_apps/sensor_demo/iar/sensor_demo.ewd | 9419 ++++++++++++++++++++ .../demo_apps/sensor_demo/iar/sensor_demo.ewp | 1891 ++++ .../demo_apps/sensor_demo/iar/sensor_demo.eww | 4 + .../demo_apps/sensor_demo/sensor_demo_imx7d/main.c | 237 + .../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 + .../driver_examples/adc_imx7d/main.c | 92 + .../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 | 54 + .../gpio_imx/iar/gpio_imx_example.ewd | 9419 ++++++++++++++++++++ .../gpio_imx/iar/gpio_imx_example.ewp | 1891 ++++ .../gpio_imx/iar/gpio_imx_example.eww | 4 + .../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 + .../driver_examples/gpt/ds5/.cproject | 137 + .../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 + .../imx7_colibri_m4/driver_examples/gpt/main.c | 135 + .../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 + .../driver_examples/wdog_imx/main.c | 79 + examples/imx7_colibri_m4/gpio_pins.c | 68 + examples/imx7_colibri_m4/gpio_pins.h | 62 + examples/imx7_colibri_m4/pin_mux.c | 197 + examples/imx7_colibri_m4/pin_mux.h | 94 + 275 files changed, 170079 insertions(+) create mode 100644 examples/imx7_colibri_m4/FreeRTOSConfig.h create mode 100644 examples/imx7_colibri_m4/board.c create mode 100644 examples/imx7_colibri_m4/board.h create mode 100644 examples/imx7_colibri_m4/clock_freq.c create mode 100644 examples/imx7_colibri_m4/clock_freq.h create mode 100644 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/CMakeLists.txt create mode 100755 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_all.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_all.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_debug.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_debug.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_release.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_release.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/clean.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/clean.sh create mode 100644 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/ds5/.cproject create mode 100644 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/ds5/.project create mode 100644 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/ds5/blinking_imx_demo.wsd create mode 100755 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/ds5/makedir.bat create mode 100644 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/gpio_ctrl.c create mode 100644 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/gpio_ctrl.h create mode 100644 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/gpt_timer.c create mode 100644 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/gpt_timer.h create mode 100644 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/hardware_init.c create mode 100644 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/iar/blinking_imx_demo.ewd create mode 100644 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/iar/blinking_imx_demo.ewp create mode 100644 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/iar/blinking_imx_demo.eww create mode 100644 examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/main.c create mode 100644 examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/CMakeLists.txt create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_all.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_all.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_debug.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_debug.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_release.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_release.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/clean.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/clean.sh create mode 100644 examples/imx7_colibri_m4/demo_apps/hello_world/ds5/.cproject create mode 100644 examples/imx7_colibri_m4/demo_apps/hello_world/ds5/.project create mode 100644 examples/imx7_colibri_m4/demo_apps/hello_world/ds5/hello_world.wsd create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world/ds5/makedir.bat create mode 100644 examples/imx7_colibri_m4/demo_apps/hello_world/hardware_init.c create mode 100644 examples/imx7_colibri_m4/demo_apps/hello_world/iar/hello_world.ewd create mode 100644 examples/imx7_colibri_m4/demo_apps/hello_world/iar/hello_world.ewp create mode 100644 examples/imx7_colibri_m4/demo_apps/hello_world/iar/hello_world.eww create mode 100644 examples/imx7_colibri_m4/demo_apps/hello_world/main.c create mode 100644 examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/CMakeLists.txt create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_all.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_all.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_debug.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_debug.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_release.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_release.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/clean.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/clean.sh create mode 100644 examples/imx7_colibri_m4/demo_apps/hello_world_qspi/ds5/.cproject create mode 100644 examples/imx7_colibri_m4/demo_apps/hello_world_qspi/ds5/.project create mode 100644 examples/imx7_colibri_m4/demo_apps/hello_world_qspi/ds5/hello_world_qspi.wsd create mode 100755 examples/imx7_colibri_m4/demo_apps/hello_world_qspi/ds5/makedir.bat create mode 100644 examples/imx7_colibri_m4/demo_apps/hello_world_qspi/iar/hello_world_qspi.ewd create mode 100644 examples/imx7_colibri_m4/demo_apps/hello_world_qspi/iar/hello_world_qspi.ewp create mode 100644 examples/imx7_colibri_m4/demo_apps/hello_world_qspi/iar/hello_world_qspi.eww create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/CMakeLists.txt create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_all.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_all.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_debug.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_debug.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_release.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_release.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/clean.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/clean.sh create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/ds5/.cproject create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/ds5/.project create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/ds5/makedir.bat create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/ds5/rpmsg_pingpong_example.wsd create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/hardware_init.c create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/iar/rpmsg_pingpong_example.ewd create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/iar/rpmsg_pingpong_example.ewp create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/iar/rpmsg_pingpong_example.eww create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/pingpong.c create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/CMakeLists.txt create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_all.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_all.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_debug.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_debug.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_release.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_release.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/clean.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/clean.sh create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/ds5/.cproject create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/ds5/.project create mode 100755 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/ds5/makedir.bat create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/ds5/rpmsg_str_echo_example.wsd create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/hardware_init.c create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/iar/rpmsg_str_echo_example.ewd create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/iar/rpmsg_str_echo_example.ewp create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/iar/rpmsg_str_echo_example.eww create mode 100644 examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/str_echo.c create mode 100644 examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/CMakeLists.txt create mode 100755 examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_all.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_all.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_debug.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_debug.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_release.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_release.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/clean.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/clean.sh create mode 100644 examples/imx7_colibri_m4/demo_apps/sema4_demo/ds5/.cproject create mode 100644 examples/imx7_colibri_m4/demo_apps/sema4_demo/ds5/.project create mode 100755 examples/imx7_colibri_m4/demo_apps/sema4_demo/ds5/makedir.bat create mode 100644 examples/imx7_colibri_m4/demo_apps/sema4_demo/ds5/sema4_demo.wsd create mode 100644 examples/imx7_colibri_m4/demo_apps/sema4_demo/hardware_init.c create mode 100644 examples/imx7_colibri_m4/demo_apps/sema4_demo/iar/sema4_demo.ewd create mode 100644 examples/imx7_colibri_m4/demo_apps/sema4_demo/iar/sema4_demo.ewp create mode 100644 examples/imx7_colibri_m4/demo_apps/sema4_demo/iar/sema4_demo.eww create mode 100644 examples/imx7_colibri_m4/demo_apps/sema4_demo/main.c create mode 100644 examples/imx7_colibri_m4/demo_apps/sema4_demo/sema4_mutex.c create mode 100644 examples/imx7_colibri_m4/demo_apps/sema4_demo/sema4_mutex.h create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/CMakeLists.txt create mode 100755 examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_all.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_all.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_debug.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_debug.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_release.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_release.sh create mode 100755 examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/clean.bat create mode 100755 examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/clean.sh create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/common/fxas21002.c create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/common/fxas21002.h create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/common/fxos8700.c create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/common/fxos8700.h create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/common/i2c_xfer.c create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/common/i2c_xfer.h create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/common/mma8451q.c create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/common/mma8451q.h create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/common/mpl3115.c create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/common/mpl3115.h create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/ds5/.cproject create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/ds5/.project create mode 100755 examples/imx7_colibri_m4/demo_apps/sensor_demo/ds5/makedir.bat create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/ds5/sensor_demo.wsd create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/hardware_init.c create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/iar/sensor_demo.ewd create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/iar/sensor_demo.ewp create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/iar/sensor_demo.eww create mode 100644 examples/imx7_colibri_m4/demo_apps/sensor_demo/sensor_demo_imx7d/main.c create mode 100644 examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/CMakeLists.txt create mode 100755 examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_all.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_all.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_debug.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_debug.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_release.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_release.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/clean.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/clean.sh create mode 100644 examples/imx7_colibri_m4/driver_examples/adc_imx7d/ds5/.cproject create mode 100644 examples/imx7_colibri_m4/driver_examples/adc_imx7d/ds5/.project create mode 100644 examples/imx7_colibri_m4/driver_examples/adc_imx7d/ds5/adc_imx7d_example.wsd create mode 100755 examples/imx7_colibri_m4/driver_examples/adc_imx7d/ds5/makedir.bat create mode 100644 examples/imx7_colibri_m4/driver_examples/adc_imx7d/hardware_init.c create mode 100644 examples/imx7_colibri_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.ewd create mode 100644 examples/imx7_colibri_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.ewp create mode 100644 examples/imx7_colibri_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.eww create mode 100644 examples/imx7_colibri_m4/driver_examples/adc_imx7d/main.c create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/CMakeLists.txt create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_all.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_all.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_debug.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_debug.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_release.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_release.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/clean.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/clean.sh create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/ds5/.cproject create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/ds5/.project create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/ds5/flexcan_loopback_example.wsd create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/ds5/makedir.bat create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/hardware_init.c create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.ewd create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.ewp create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.eww create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/main.c create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/CMakeLists.txt create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_all.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_all.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_debug.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_debug.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_release.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_release.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/clean.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/clean.sh create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/ds5/.cproject create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/ds5/.project create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/ds5/flexcan_network_example.wsd create mode 100755 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/ds5/makedir.bat create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/hardware_init.c create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.ewd create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.ewp create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.eww create mode 100644 examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/main.c create mode 100644 examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/CMakeLists.txt create mode 100755 examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_all.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_all.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_debug.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_debug.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_release.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_release.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/clean.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/clean.sh create mode 100644 examples/imx7_colibri_m4/driver_examples/gpio_imx/ds5/.cproject create mode 100644 examples/imx7_colibri_m4/driver_examples/gpio_imx/ds5/.project create mode 100644 examples/imx7_colibri_m4/driver_examples/gpio_imx/ds5/gpio_imx_example.wsd create mode 100755 examples/imx7_colibri_m4/driver_examples/gpio_imx/ds5/makedir.bat create mode 100644 examples/imx7_colibri_m4/driver_examples/gpio_imx/hardware_init.c create mode 100644 examples/imx7_colibri_m4/driver_examples/gpio_imx/iar/gpio_imx_example.ewd create mode 100644 examples/imx7_colibri_m4/driver_examples/gpio_imx/iar/gpio_imx_example.ewp create mode 100644 examples/imx7_colibri_m4/driver_examples/gpio_imx/iar/gpio_imx_example.eww create mode 100644 examples/imx7_colibri_m4/driver_examples/gpio_imx/main.c create mode 100644 examples/imx7_colibri_m4/driver_examples/gpt/armgcc/CMakeLists.txt create mode 100755 examples/imx7_colibri_m4/driver_examples/gpt/armgcc/build_all.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/gpt/armgcc/build_all.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/gpt/armgcc/build_debug.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/gpt/armgcc/build_debug.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/gpt/armgcc/build_release.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/gpt/armgcc/build_release.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/gpt/armgcc/clean.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/gpt/armgcc/clean.sh create mode 100644 examples/imx7_colibri_m4/driver_examples/gpt/ds5/.cproject create mode 100644 examples/imx7_colibri_m4/driver_examples/gpt/ds5/.project create mode 100644 examples/imx7_colibri_m4/driver_examples/gpt/ds5/gpt_example.wsd create mode 100755 examples/imx7_colibri_m4/driver_examples/gpt/ds5/makedir.bat create mode 100644 examples/imx7_colibri_m4/driver_examples/gpt/hardware_init.c create mode 100644 examples/imx7_colibri_m4/driver_examples/gpt/iar/gpt_example.ewd create mode 100644 examples/imx7_colibri_m4/driver_examples/gpt/iar/gpt_example.ewp create mode 100644 examples/imx7_colibri_m4/driver_examples/gpt/iar/gpt_example.eww create mode 100644 examples/imx7_colibri_m4/driver_examples/gpt/main.c create mode 100644 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/CMakeLists.txt create mode 100755 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_all.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_all.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_debug.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_debug.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_release.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_release.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/clean.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/clean.sh create mode 100644 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/ds5/.cproject create mode 100644 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/ds5/.project create mode 100755 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/ds5/makedir.bat create mode 100644 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/ds5/uart_imx_interrupt_example.wsd create mode 100644 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/hardware_init.c create mode 100644 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.ewd create mode 100644 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.ewp create mode 100644 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.eww create mode 100644 examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/main.c create mode 100644 examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/CMakeLists.txt create mode 100755 examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_all.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_all.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_debug.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_debug.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_release.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_release.sh create mode 100755 examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/clean.bat create mode 100755 examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/clean.sh create mode 100644 examples/imx7_colibri_m4/driver_examples/wdog_imx/ds5/.cproject create mode 100644 examples/imx7_colibri_m4/driver_examples/wdog_imx/ds5/.project create mode 100755 examples/imx7_colibri_m4/driver_examples/wdog_imx/ds5/makedir.bat create mode 100644 examples/imx7_colibri_m4/driver_examples/wdog_imx/ds5/wdog_imx_example.wsd create mode 100644 examples/imx7_colibri_m4/driver_examples/wdog_imx/hardware_init.c create mode 100644 examples/imx7_colibri_m4/driver_examples/wdog_imx/iar/wdog_imx_example.ewd create mode 100644 examples/imx7_colibri_m4/driver_examples/wdog_imx/iar/wdog_imx_example.ewp create mode 100644 examples/imx7_colibri_m4/driver_examples/wdog_imx/iar/wdog_imx_example.eww create mode 100644 examples/imx7_colibri_m4/driver_examples/wdog_imx/main.c create mode 100644 examples/imx7_colibri_m4/gpio_pins.c create mode 100644 examples/imx7_colibri_m4/gpio_pins.h create mode 100644 examples/imx7_colibri_m4/pin_mux.c create mode 100644 examples/imx7_colibri_m4/pin_mux.h diff --git a/examples/imx7_colibri_m4/FreeRTOSConfig.h b/examples/imx7_colibri_m4/FreeRTOSConfig.h new file mode 100644 index 0000000..39dcb8e --- /dev/null +++ b/examples/imx7_colibri_m4/FreeRTOSConfig.h @@ -0,0 +1,163 @@ +/* + FreeRTOS V8.0.0 - Copyright (C) 2014 Real Time Engineers Ltd. + All rights reserved + + VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. + + *************************************************************************** + * * + * FreeRTOS provides completely free yet professionally developed, * + * robust, strictly quality controlled, supported, and cross * + * platform software that has become a de facto standard. * + * * + * Help yourself get started quickly and support the FreeRTOS * + * project by purchasing a FreeRTOS tutorial book, reference * + * manual, or both from: http://www.FreeRTOS.org/Documentation * + * * + * Thank you! * + * * + *************************************************************************** + + This file is part of the FreeRTOS distribution. + + FreeRTOS is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License (version 2) as published by the + Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. + + >>! NOTE: The modification to the GPL is included to allow you to distribute + >>! a combined work that includes FreeRTOS without being obliged to provide + >>! the source code for proprietary components outside of the FreeRTOS + >>! kernel. + + FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + FOR A PARTICULAR PURPOSE. Full license text is available from the following + link: http://www.freertos.org/a00114.html + + 1 tab == 4 spaces! + + *************************************************************************** + * * + * Having a problem? Start by reading the FAQ "My application does * + * not run, what could be wrong?" * + * * + * http://www.FreeRTOS.org/FAQHelp.html * + * * + *************************************************************************** + + http://www.FreeRTOS.org - Documentation, books, training, latest versions, + license and Real Time Engineers Ltd. contact details. + + http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, + including FreeRTOS+Trace - an indispensable productivity tool, a DOS + compatible FAT file system, and our tiny thread aware UDP/IP stack. + + http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High + Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS + licenses offer ticketed support, indemnification and middleware. + + http://www.SafeRTOS.com - High Integrity Systems also provide a safety + engineered and independently SIL3 certified version for use in safety and + mission critical applications that require provable dependability. + + 1 tab == 4 spaces! +*/ + + +#ifndef FREERTOS_CONFIG_H +#define FREERTOS_CONFIG_H + +/*----------------------------------------------------------- + * Application specific definitions. + * + * These definitions should be adjusted for your particular hardware and + * application requirements. + * + * THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE + * FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE. + * + * See http://www.freertos.org/a00110.html. + *----------------------------------------------------------*/ + +/* Ensure stdint is only used by the compiler, and not the assembler. */ +#ifdef __ICCARM__ + #include +#endif + +#define configUSE_PREEMPTION 1 +#define configUSE_IDLE_HOOK 0 +#define configUSE_TICK_HOOK 0 +#define configCPU_CLOCK_HZ (240000000ul) +#define configTICK_RATE_HZ ((TickType_t)1000) +#define configMAX_PRIORITIES (5) +#define configMINIMAL_STACK_SIZE ((unsigned short)130) +#define configTOTAL_HEAP_SIZE ((size_t)(20 * 1024)) +#define configMAX_TASK_NAME_LEN (10) +#define configUSE_TRACE_FACILITY 0 +#define configUSE_16_BIT_TICKS 0 +#define configIDLE_SHOULD_YIELD 1 +#define configUSE_MUTEXES 1 +#define configQUEUE_REGISTRY_SIZE 8 +#define configCHECK_FOR_STACK_OVERFLOW 0 +#define configUSE_RECURSIVE_MUTEXES 1 +#define configUSE_MALLOC_FAILED_HOOK 0 +#define configUSE_APPLICATION_TASK_TAG 0 +#define configUSE_COUNTING_SEMAPHORES 1 +#define configGENERATE_RUN_TIME_STATS 0 + +/* Co-routine definitions. */ +#define configUSE_CO_ROUTINES 0 +#define configMAX_CO_ROUTINE_PRIORITIES (2) + +/* Software timer definitions. */ +#define configUSE_TIMERS 1 +#define configTIMER_TASK_PRIORITY (2) +#define configTIMER_QUEUE_LENGTH 10 +#define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE * 2) + +/* Set the following definitions to 1 to include the API function, or zero +to exclude the API function. */ +#define INCLUDE_vTaskPrioritySet 1 +#define INCLUDE_uxTaskPriorityGet 1 +#define INCLUDE_vTaskDelete 1 +#define INCLUDE_vTaskCleanUpResources 1 +#define INCLUDE_vTaskSuspend 1 +#define INCLUDE_vTaskDelayUntil 1 +#define INCLUDE_vTaskDelay 1 + +/* Cortex-M specific definitions. */ +#ifdef __NVIC_PRIO_BITS + /* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */ + #define configPRIO_BITS __NVIC_PRIO_BITS +#else + #define configPRIO_BITS 4 /* 15 priority levels */ +#endif + +/* The lowest interrupt priority that can be used in a call to a "set priority" +function. */ +#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0xf + +/* The highest interrupt priority that can be used by any interrupt service +routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL +INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER +PRIORITY THAN THIS! (higher priorities are lower numeric values. */ +#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 1 + +/* Interrupt priorities used by the kernel port layer itself. These are generic +to all Cortex-M ports, and do not rely on any particular library functions. */ +#define configKERNEL_INTERRUPT_PRIORITY (configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS)) +/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!! +See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ +#define configMAX_SYSCALL_INTERRUPT_PRIORITY (configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS)) + +/* Normal assert() semantics without relying on the provision of an assert.h +header file. */ +#define configASSERT(x) if((x) == 0) {taskDISABLE_INTERRUPTS(); for(;;);} + +/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS +standard names. */ +#define vPortSVCHandler SVC_Handler +#define xPortPendSVHandler PendSV_Handler +#define xPortSysTickHandler SysTick_Handler + +#endif /* FREERTOS_CONFIG_H */ diff --git a/examples/imx7_colibri_m4/board.c b/examples/imx7_colibri_m4/board.c new file mode 100644 index 0000000..3ac84e4 --- /dev/null +++ b/examples/imx7_colibri_m4/board.c @@ -0,0 +1,93 @@ +/* + * 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 "debug_console_imx.h" +#include "ccm_imx7d.h" +#include "rdc.h" +#include "wdog_imx.h" +#include "pin_mux.h" + +/* Initialize clock. */ +void BOARD_ClockInit(void) +{ + /* OSC/PLL is already initialized by Cortex-A7 (u-boot) */ + + /* Disable WDOG3 */ + CCM_UpdateRoot(CCM, ccmRootWdog, ccmRootmuxWdogOsc24m, 0, 0); + CCM_EnableRoot(CCM, ccmRootWdog); + CCM_ControlGate(CCM, ccmCcgrGateWdog3, ccmClockNeededRun); + WDOG_DisablePowerdown(BOARD_WDOG_BASEADDR); + CCM_ControlGate(CCM, ccmCcgrGateWdog3, ccmClockNotNeeded); + CCM_DisableRoot(CCM, ccmRootWdog); + + /* We need system PLL Div2 to run M4 core */ + CCM_ControlGate(CCM, ccmPllGateSys, ccmClockNeededRun); + CCM_ControlGate(CCM, ccmPllGateSysDiv2, ccmClockNeededRun); + + /* Enable clock gate for IP bridge and IO mux */ + CCM_ControlGate(CCM, ccmCcgrGateIpmux1, ccmClockNeededRun); + CCM_ControlGate(CCM, ccmCcgrGateIpmux2, ccmClockNeededRun); + CCM_ControlGate(CCM, ccmCcgrGateIpmux3, ccmClockNeededRun); + CCM_ControlGate(CCM, ccmCcgrGateIomux, ccmClockNeededRun); + CCM_ControlGate(CCM, ccmCcgrGateIomuxLpsr, ccmClockNeededRun); + + /* Enable clock gate for RDC */ + CCM_ControlGate(CCM, ccmCcgrGateRdc, ccmClockNeededRun); +} + +/* Initialize debug console. */ +void dbg_uart_init(void) +{ + /* Set debug uart for M4 core domain access only */ + RDC_SetPdapAccess(RDC, BOARD_DEBUG_UART_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false); + + /* 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); + + /* Config debug uart pins */ + configure_uart_pins(BOARD_DEBUG_UART_BASEADDR); + + DbgConsole_Init(BOARD_DEBUG_UART_BASEADDR, get_uart_clock_freq(BOARD_DEBUG_UART_BASEADDR), 115200); +} + +void BOARD_RdcInit(void) +{ + /* Move M4 core to specific RDC domain */ + RDC_SetDomainID(RDC, rdcMdaM4, BOARD_DOMAIN_ID, false); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/board.h b/examples/imx7_colibri_m4/board.h new file mode 100644 index 0000000..64e5920 --- /dev/null +++ b/examples/imx7_colibri_m4/board.h @@ -0,0 +1,137 @@ +/* + * 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. + */ + +#if !defined(__BOARD_H__) +#define __BOARD_H__ + +#include "pin_mux.h" +#include "rdc.h" +#include "rdc_defs_imx7d.h" +#include "ccm_imx7d.h" +#include "clock_freq.h" + +/* The board name */ +#define BOARD_NAME "IMX7D_SDB_M4" +#define BOARD_DOMAIN_ID (1) + +/* ADC information for this board */ +#define BOARD_ADC_RDC_PDAP rdcPdapAdc1 +#define BOARD_ADC_CCM_CCGR ccmCcgrGateAdc +#define BOARD_ADC_BASEADDR ADC1 +#define BOARD_ADC_IRQ_NUM ADC1_IRQn +#define BOARD_ADC_HANDLER ADC1_Handler +#define BOARD_ADC_INPUT_CHANNEL (3) + +/* WDOG information for this board */ +#define BOARD_WDOG_RDC_PDAP rdcPdapWdog3 +#define BOARD_WDOG_CCM_ROOT ccmRootWdog +#define BOARD_WDOG_CCM_CCGR ccmCcgrGateWdog3 +#define BOARD_WDOG_BASEADDR WDOG3 +#define BOARD_WDOG_IRQ_NUM WDOG3_IRQn +#define BOARD_WDOG_HANDLER WDOG3_Handler + +/* SEMA4 information for this board */ +#define BOARD_SEMA4_RDC_PDAP rdcPdapSemaphoreHs +#define BOARD_SEMA4_CCM_CCGR ccmCcgrGateSemaHs +#define BOARD_SEMA4_BASEADDR SEMA4 +#define BOARD_SEMA4_IRQ_NUM HS1_IRQn +#define BOARD_SEMA4_HANDLER SEMA4_Handler + +/* GPT instance A information for this board */ +#define BOARD_GPTA_RDC_PDAP rdcPdapGpt3 +#define BOARD_GPTA_CCM_ROOT ccmRootGpt3 +#define BOARD_GPTA_CCM_CCGR ccmCcgrGateGpt3 +#define BOARD_GPTA_BASEADDR GPT3 +#define BOARD_GPTA_IRQ_NUM GPT3_IRQn +#define BOARD_GPTA_HANDLER GPT3_Handler +/* GPT instance B information for this board */ +#define BOARD_GPTB_RDC_PDAP rdcPdapGpt4 +#define BOARD_GPTB_CCM_ROOT ccmRootGpt4 +#define BOARD_GPTB_CCM_CCGR ccmCcgrGateGpt4 +#define BOARD_GPTB_BASEADDR GPT4 +#define BOARD_GPTB_IRQ_NUM GPT4_IRQn +#define BOARD_GPTB_HANDLER GPT4_Handler + +/* GPIO information for this board */ +#define BOARD_GPIO_CCM_CCGR ccmCcgrGateGpio5 +#define BOARD_GPIO_KEY_RDC_PDAP rdcPdapGpio5 +#define BOARD_GPIO_KEY_CONFIG (&gpioKeyFunc1) +#define BOARD_GPIO_KEY_IRQ_NUM GPIO5_INT15_0_IRQn +#define BOARD_GPIO_KEY_HANDLER GPIO5_INT15_0_Handler + +/* Debug UART information for this board */ +#define BOARD_DEBUG_UART_RDC_PDAP rdcPdapUart2 +#define BOARD_DEBUG_UART_CCM_ROOT ccmRootUart2 +#define BOARD_DEBUG_UART_CCM_CCGR ccmCcgrGateUart2 +#define BOARD_DEBUG_UART_BASEADDR UART2 +#define BOARD_DEBUG_UART_IRQ_NUM UART2_IRQn +#define BOARD_DEBUG_UART_HANDLER UART2_Handler + +/* MU information for this board*/ +#define BOARD_MU_HANDLER MU_Handler +#define BOARD_MU_IRQ_NUM MU_INT_M4_IRQn +#define BOARD_MU_BASE_ADDR MU0_B +#define BOARD_MU_CCM_CCGR ccmCcgrGateMu +#define BOARD_MU_RDC_PDAP rdcPdapMuB + +/* I2C information for this board */ +#define BOARD_I2C_RDC_PDAP rdcPdapI2c2 +#define BOARD_I2C_CCM_ROOT ccmRootI2c2 +#define BOARD_I2C_CCM_CCGR ccmCcgrGateI2c2 +#define BOARD_I2C_BASEADDR I2C2 +#define BOARD_I2C_IRQ_NUM I2C2_IRQn +#define BOARD_I2C_HANDLER I2C2_Handler +#define BOARD_I2C_FXAS21002_ADDR (0x20) +#define BOARD_I2C_FXOS8700_ADDR (0x1E) + +/* FlexCAN information for this board */ +#define BOARD_FLEXCAN_RDC_PDAP rdcPdapFlexCan2 +#define BOARD_FLEXCAN_CCM_ROOT ccmRootCan2 +#define BOARD_FLEXCAN_CCM_CCGR ccmCcgrGateCan2 +#define BOARD_FLEXCAN_BASEADDR CAN2 +#define BOARD_FLEXCAN_IRQ_NUM FLEXCAN2_IRQn +#define BOARD_FLEXCAN_HANDLER FLEXCAN2_Handler + + +#if defined(__cplusplus) +extern "C" { +#endif /* __cplusplus */ + +void hardware_init(void); +void dbg_uart_init(void); +/* Function to initialize clock base on board configuration. */ +void BOARD_ClockInit(void); +void BOARD_RdcInit(void); + +#if defined(__cplusplus) +} +#endif /* __cplusplus */ + +#endif /* __BOARD_H__ */ diff --git a/examples/imx7_colibri_m4/clock_freq.c b/examples/imx7_colibri_m4/clock_freq.c new file mode 100644 index 0000000..3c5715b --- /dev/null +++ b/examples/imx7_colibri_m4/clock_freq.c @@ -0,0 +1,252 @@ +/* + * 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 "clock_freq.h" +#include "ccm_imx7d.h" +#include "ccm_analog_imx7d.h" + +/*FUNCTION********************************************************************** + * + * Function Name : get_gpt_clock_freq + * Description : Get clock frequency applys to the GPT module + * + *END**************************************************************************/ +uint32_t get_gpt_clock_freq(GPT_Type* base) +{ + uint32_t root; + uint32_t hz; + uint32_t pre, post; + + switch((uint32_t)base) + { + case GPT3_BASE: + root = CCM_GetRootMux(CCM, ccmRootGpt3); + CCM_GetRootDivider(CCM, ccmRootGpt3, &pre, &post); + break; + case GPT4_BASE: + root = CCM_GetRootMux(CCM, ccmRootGpt4); + CCM_GetRootDivider(CCM, ccmRootGpt4, &pre, &post); + break; + default: + return 0; + } + + switch(root) + { + case ccmRootmuxGptOsc24m: + hz = 24000000; + break; + case ccmRootmuxGptSysPllPfd0: + hz = CCM_ANALOG_GetPfdFreq(CCM_ANALOG, ccmAnalogPfd0Frac); + break; + default: + return 0; + } + + return hz / (pre + 1) / (post + 1); +} + +/*FUNCTION********************************************************************** + * + * Function Name : get_ecspi_clock_freq + * Description : Get clock frequency applys to the ECSPI module + * + *END**************************************************************************/ +uint32_t get_ecspi_clock_freq(ECSPI_Type* base) +{ + uint32_t root; + uint32_t hz; + uint32_t pre, post; + + switch((uint32_t)base) + { + case ECSPI1_BASE: + root = CCM_GetRootMux(CCM, ccmRootEcspi1); + CCM_GetRootDivider(CCM, ccmRootEcspi1, &pre, &post); + break; + case ECSPI2_BASE: + root = CCM_GetRootMux(CCM, ccmRootEcspi2); + CCM_GetRootDivider(CCM, ccmRootEcspi2, &pre, &post); + break; + default: + return 0; + } + + switch(root) + { + case ccmRootmuxEcspiOsc24m: + hz = 24000000; + break; + case ccmRootmuxEcspiSysPllPfd4: + hz = CCM_ANALOG_GetPfdFreq(CCM_ANALOG, ccmAnalogPfd4Frac); + break; + default: + return 0; + } + + return hz / (pre + 1) / (post + 1); +} + +/*FUNCTION********************************************************************** + * + * Function Name : get_flexcan_clock_freq + * Description : Get clock frequency applys to the FLEXCAN module + * + *END**************************************************************************/ +uint32_t get_flexcan_clock_freq(CAN_Type* base) +{ + uint32_t root; + uint32_t hz; + uint32_t pre, post; + + switch((uint32_t)base) + { + case CAN1_BASE: + root = CCM_GetRootMux(CCM, ccmRootCan1); + CCM_GetRootDivider(CCM, ccmRootCan1, &pre, &post); + break; + case CAN2_BASE: + root = CCM_GetRootMux(CCM, ccmRootCan2); + CCM_GetRootDivider(CCM, ccmRootCan2, &pre, &post); + break; + default: + return 0; + } + + switch(root) + { + case ccmRootmuxCanOsc24m: + hz = 24000000; + break; + case ccmRootmuxCanSysPllDiv4: + hz = CCM_ANALOG_GetSysPllFreq(CCM_ANALOG) >> 2; + break; + case ccmRootmuxCanSysPllDiv1: + hz = CCM_ANALOG_GetSysPllFreq(CCM_ANALOG); + break; + default: + return 0; + } + + return hz / (pre + 1) / (post + 1); +} + +/*FUNCTION********************************************************************** + * + * Function Name : get_I2C_clock_freq + * Description : Get clock frequency applys to the I2C module + * + *END**************************************************************************/ +uint32_t get_i2c_clock_freq(I2C_Type* base) +{ + uint32_t root; + uint32_t hz; + uint32_t pre, post; + + switch((uint32_t)base) + { + case I2C1_BASE: + root = CCM_GetRootMux(CCM, ccmRootI2c1); + CCM_GetRootDivider(CCM, ccmRootI2c1, &pre, &post); + break; + case I2C2_BASE: + root = CCM_GetRootMux(CCM, ccmRootI2c2); + CCM_GetRootDivider(CCM, ccmRootI2c2, &pre, &post); + break; + case I2C3_BASE: + root = CCM_GetRootMux(CCM, ccmRootI2c3); + CCM_GetRootDivider(CCM, ccmRootI2c3, &pre, &post); + break; + case I2C4_BASE: + root = CCM_GetRootMux(CCM, ccmRootI2c4); + CCM_GetRootDivider(CCM, ccmRootI2c4, &pre, &post); + break; + default: + return 0; + } + + switch(root) + { + case ccmRootmuxI2cOsc24m: + hz = 24000000; + break; + case ccmRootmuxI2cSysPllDiv4: + hz = CCM_ANALOG_GetSysPllFreq(CCM_ANALOG) >> 2; + break; + default: + return 0; + } + + return hz / (pre + 1) / (post + 1); +} + +/*FUNCTION********************************************************************** + * + * Function Name : get_uart_clock_freq + * Description : Get clock frequency applys to the UART module + * + *END**************************************************************************/ +uint32_t get_uart_clock_freq(UART_Type* base) +{ + uint32_t root; + uint32_t hz; + uint32_t pre, post; + + switch((uint32_t)base) + { + case UART2_BASE: + root = CCM_GetRootMux(CCM, ccmRootUart2); + CCM_GetRootDivider(CCM, ccmRootUart2, &pre, &post); + break; + default: + return 0; + } + + switch(root) + { + case ccmRootmuxUartOsc24m: + hz = 24000000; + break; + case ccmRootmuxUartSysPllDiv2: + hz = CCM_ANALOG_GetSysPllFreq(CCM_ANALOG) >> 1; + break; + case ccmRootmuxUartSysPllDiv1: + hz = CCM_ANALOG_GetSysPllFreq(CCM_ANALOG); + break; + default: + return 0; + } + + return hz / (pre + 1) / (post + 1); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/clock_freq.h b/examples/imx7_colibri_m4/clock_freq.h new file mode 100644 index 0000000..da2ba6d --- /dev/null +++ b/examples/imx7_colibri_m4/clock_freq.h @@ -0,0 +1,98 @@ +/* + * 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. + */ + +#ifndef __CLOCK_FREQ_H__ +#define __CLOCK_FREQ_H__ + +#include "device_imx.h" + +/*! + * @addtogroup clock_freq_helper + * @{ + */ + +/******************************************************************************* + * API + ******************************************************************************/ + +#if defined(__cplusplus) +extern "C" { +#endif + +/*! + * @brief Get clock frequency applys to the GPT module + * + * @param base GPT base pointer. + * @return clock frequency (in HZ) applys to the GPT module + */ +uint32_t get_gpt_clock_freq(GPT_Type* base); + +/*! + * @brief Get clock frequency applys to the ECSPI module + * + * @param base ECSPI base pointer. + * @return clock frequency (in HZ) applys to the ECSPI module + */ +uint32_t get_ecspi_clock_freq(ECSPI_Type* base); + +/*! + * @brief Get clock frequency applys to the FLEXCAN module + * + * @param base CAN base pointer. + * @return clock frequency (in HZ) applys to the FLEXCAN module + */ +uint32_t get_flexcan_clock_freq(CAN_Type* base); + +/*! + * @brief Get clock frequency applys to the I2C module + * + * @param base I2C base pointer. + * @return clock frequency (in HZ) applys to the I2C module + */ +uint32_t get_i2c_clock_freq(I2C_Type* base); + +/*! + * @brief Get clock frequency applys to the UART module + * + * @param base UART base pointer. + * @return clock frequency (in HZ) applys to the UART module + */ +uint32_t get_uart_clock_freq(UART_Type* base); + +#if defined(__cplusplus) +} +#endif + +/*! @}*/ + +#endif /* __CLOCK_FREQ_H__ */ +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/CMakeLists.txt b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/CMakeLists.txt new file mode 100644 index 0000000..87ec30e --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/CMakeLists.txt @@ -0,0 +1,168 @@ +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}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F) + 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}/../../../../../rtos/FreeRTOS/Source/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F) + 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}/../../../../../rtos/FreeRTOS/Source/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(blinking_imx_demo + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h" + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/MemMang/heap_2.c" + "${ProjDirPath}/../../../FreeRTOSConfig.h" + "${ProjDirPath}/../main.c" + "${ProjDirPath}/../gpt_timer.c" + "${ProjDirPath}/../gpt_timer.h" + "${ProjDirPath}/../gpio_ctrl.c" + "${ProjDirPath}/../gpio_ctrl.h" + "${ProjDirPath}/../../../../../platform/drivers/src/gpio_imx.c" + "${ProjDirPath}/../../../../../platform/drivers/inc/gpio_imx.h" + "${ProjDirPath}/../../../../../platform/drivers/src/gpt.c" + "${ProjDirPath}/../../../../../platform/drivers/inc/gpt.h" + "${ProjDirPath}/../../../../../platform/drivers/src/rdc_semaphore.c" + "${ProjDirPath}/../../../../../platform/drivers/inc/rdc_semaphore.h" + "${ProjDirPath}/../../../../../platform/drivers/src/uart_imx.c" + "${ProjDirPath}/../../../../../platform/drivers/inc/uart_imx.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/croutine.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/event_groups.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/FreeRTOS.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/list.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/mpu_wrappers.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/portable.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/projdefs.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/queue.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/semphr.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/StackMacros.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/task.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/timers.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}/../../../../../rtos/FreeRTOS/Source/croutine.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/event_groups.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/list.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/queue.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/tasks.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/timers.c" + "${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/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/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" +) +SET_TARGET_PROPERTIES(blinking_imx_demo PROPERTIES OUTPUT_NAME "blinking_imx_demo.elf") + +TARGET_LINK_LIBRARIES(blinking_imx_demo -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(blinking_imx_demo m) +TARGET_LINK_LIBRARIES(blinking_imx_demo c) +TARGET_LINK_LIBRARIES(blinking_imx_demo gcc) +TARGET_LINK_LIBRARIES(blinking_imx_demo nosys) +TARGET_LINK_LIBRARIES(blinking_imx_demo -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/blinking_imx_demo.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/blinking_imx_demo.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET blinking_imx_demo POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/blinking_imx_demo.elf ${EXECUTABLE_OUTPUT_PATH}/blinking_imx_demo.hex) +ADD_CUSTOM_COMMAND(TARGET blinking_imx_demo POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/blinking_imx_demo.elf ${EXECUTABLE_OUTPUT_PATH}/blinking_imx_demo.bin) diff --git a/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_all.bat b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_all.bat new file mode 100755 index 0000000..6d41d86 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/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/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_all.sh b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_all.sh new file mode 100755 index 0000000..ebb0c25 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/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/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_debug.bat b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_debug.bat new file mode 100755 index 0000000..bf3b902 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/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/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_debug.sh b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_debug.sh new file mode 100755 index 0000000..571868b --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/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/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_release.bat b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_release.bat new file mode 100755 index 0000000..e229a83 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/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/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_release.sh b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/build_release.sh new file mode 100755 index 0000000..035ce4e --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/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/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/clean.bat b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/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/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/clean.sh b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/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/imx7_colibri_m4/demo_apps/blinking_imx_demo/ds5/.cproject b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/ds5/.cproject new file mode 100644 index 0000000..e68e7d6 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/ds5/.project b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/ds5/.project new file mode 100644 index 0000000..130f266 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/ds5/.project @@ -0,0 +1,86 @@ + + + blinking_imx_demo_imx7d_sdb_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 + + + freertos2virtual:/virtualfreertos/port.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.cfreertos2virtual:/virtualfreertos/portmacro.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.hstartup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sfreertos2virtual:/virtualfreertos/heap_2.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/portable/MemMang/heap_2.cboard2virtual:/virtualboard/FreeRTOSConfig.h1PARENT-3-PROJECT_LOC/FreeRTOSConfig.hsource2virtual:/virtualsource/main.c1PARENT-1-PROJECT_LOC/main.csource2virtual:/virtualsource/gpt_timer.c1PARENT-1-PROJECT_LOC/gpt_timer.csource2virtual:/virtualsource/gpt_timer.h1PARENT-1-PROJECT_LOC/gpt_timer.hsource2virtual:/virtualsource/gpio_ctrl.c1PARENT-1-PROJECT_LOC/gpio_ctrl.csource2virtual:/virtualsource/gpio_ctrl.h1PARENT-1-PROJECT_LOC/gpio_ctrl.hdriver2virtual:/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/gpt.c1PARENT-5-PROJECT_LOC/platform/drivers/src/gpt.cdriver2virtual:/virtualdriver/gpt.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/gpt.hdriver2virtual:/virtualdriver/rdc_semaphore.c1PARENT-5-PROJECT_LOC/platform/drivers/src/rdc_semaphore.cdriver2virtual:/virtualdriver/rdc_semaphore.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/rdc_semaphore.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.hfreertos2virtual:/virtualfreertos/croutine.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/croutine.hfreertos2virtual:/virtualfreertos/event_groups.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/event_groups.hfreertos2virtual:/virtualfreertos/FreeRTOS.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/FreeRTOS.hfreertos2virtual:/virtualfreertos/list.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/list.hfreertos2virtual:/virtualfreertos/mpu_wrappers.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/mpu_wrappers.hfreertos2virtual:/virtualfreertos/portable.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/portable.hfreertos2virtual:/virtualfreertos/projdefs.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/projdefs.hfreertos2virtual:/virtualfreertos/queue.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/queue.hfreertos2virtual:/virtualfreertos/semphr.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/semphr.hfreertos2virtual:/virtualfreertos/StackMacros.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/StackMacros.hfreertos2virtual:/virtualfreertos/task.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/task.hfreertos2virtual:/virtualfreertos/timers.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/timers.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.hfreertos2virtual:/virtualfreertos/croutine.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/croutine.cfreertos2virtual:/virtualfreertos/event_groups.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/event_groups.cfreertos2virtual:/virtualfreertos/list.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/list.cfreertos2virtual:/virtualfreertos/queue.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/queue.cfreertos2virtual:/virtualfreertos/tasks.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/tasks.cfreertos2virtual:/virtualfreertos/timers.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/timers.csystem2virtual:/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.cutilities2virtual:/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.hstartup2virtual:/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.h + + + diff --git a/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/ds5/blinking_imx_demo.wsd b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/ds5/blinking_imx_demo.wsd new file mode 100644 index 0000000..97463d6 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/ds5/blinking_imx_demo.wsd @@ -0,0 +1,9 @@ + + + + blinking_imx_demo_imx7d_sdb_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/ds5/makedir.bat b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/gpio_ctrl.c b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/gpio_ctrl.c new file mode 100644 index 0000000..4cd0b7f --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/gpio_ctrl.c @@ -0,0 +1,169 @@ +/* + * 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. + */ +/**************************************************************************** +* +* Comments: +* This file contains the functions which write and read the SPI memories +* using the ECSPI driver in interrupt mode. +* +****************************************************************************/ + +#include +#include "FreeRTOS.h" +#include "semphr.h" +#include "gpio_pins.h" +#include "board.h" +#include "gpio_ctrl.h" +#include "gpio_imx.h" +#include "rdc_semaphore.h" +#include "debug_console_imx.h" + +static SemaphoreHandle_t xSemaphore; + +static void GPIO_Ctrl_InitLedPin() +{ +#ifdef BOARD_GPIO_LED_CONFIG + gpio_init_t ledInit = { + .pin = BOARD_GPIO_LED_CONFIG->pin, + .direction = gpioDigitalOutput, + .interruptMode = gpioNoIntmode + }; + + /* Acquire RDC semaphore before access GPIO to avoid conflict, it's + * necessary when GPIO RDC is configured as Semaphore Required */ + RDC_SEMAPHORE_Lock(BOARD_GPIO_LED_RDC_PDAP); + + GPIO_Init(BOARD_GPIO_LED_CONFIG->base, &ledInit); + + RDC_SEMAPHORE_Unlock(BOARD_GPIO_LED_RDC_PDAP); +#endif +} + +static void GPIO_Ctrl_InitKeyPin() +{ +#ifdef BOARD_GPIO_KEY_CONFIG + gpio_init_t keyInit = { + .pin = BOARD_GPIO_KEY_CONFIG->pin, + .direction = gpioDigitalInput, + .interruptMode = gpioIntFallingEdge + }; + + /* Acquire RDC semaphore before access GPIO to avoid conflict, it's + * necessary when GPIO RDC is configured as Semaphore Required */ + RDC_SEMAPHORE_Lock(BOARD_GPIO_KEY_RDC_PDAP); + + GPIO_Init(BOARD_GPIO_KEY_CONFIG->base, &keyInit); + + RDC_SEMAPHORE_Unlock(BOARD_GPIO_KEY_RDC_PDAP); + + /* Set GPT interrupt priority 3 */ + NVIC_SetPriority(BOARD_GPIO_KEY_IRQ_NUM, 3); +#endif +} + +void GPIO_Ctrl_Init() +{ + xSemaphore = xSemaphoreCreateBinary(); + + GPIO_Ctrl_InitLedPin(); + GPIO_Ctrl_InitKeyPin(); +} + +void GPIO_Ctrl_ToggleLed() +{ + static bool on = false; + +#ifdef BOARD_GPIO_LED_CONFIG + RDC_SEMAPHORE_Lock(BOARD_GPIO_LED_RDC_PDAP); + + GPIO_WritePinOutput(BOARD_GPIO_LED_CONFIG->base, + BOARD_GPIO_LED_CONFIG->pin, on ? gpioPinSet : gpioPinClear); + + RDC_SEMAPHORE_Unlock(BOARD_GPIO_LED_RDC_PDAP); +#else + PRINTF("%c ", on ? '+' : '-'); +#endif + + on = !on; +} + +void GPIO_Ctrl_WaitKeyPressed() +{ + TickType_t ticks; + +#ifdef BOARD_GPIO_KEY_CONFIG + RDC_SEMAPHORE_Lock(BOARD_GPIO_KEY_RDC_PDAP); + + /* Clear the interrupt state */ + 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); + + RDC_SEMAPHORE_Unlock(BOARD_GPIO_KEY_RDC_PDAP); + + /* Enable the IRQ. */ + NVIC_EnableIRQ(BOARD_GPIO_KEY_IRQ_NUM); + + /* We need wait user input for ever */ + ticks = portMAX_DELAY; + + PRINTF("\n\rPress the (%s) key to switch the blinking frequency:\n\r", BOARD_GPIO_KEY_CONFIG->name); +#else + /* Without key on board, we return every 5 seconds */ + ticks = configTICK_RATE_HZ * 5; + PRINTF("\n\rWait 5 seconds to switch blinking frequency:\n\r"); +#endif + xSemaphoreTake(xSemaphore, ticks); +} + +#ifdef BOARD_GPIO_KEY_CONFIG +void BOARD_GPIO_KEY_HANDLER() +{ + BaseType_t xHigherPriorityTaskWoken; + + /* When user input captured, we disable GPIO interrupt */ + NVIC_DisableIRQ(BOARD_GPIO_KEY_IRQ_NUM); + + RDC_SEMAPHORE_Lock(BOARD_GPIO_KEY_RDC_PDAP); + + /* Disable GPIO pin interrupt */ + GPIO_SetPinIntMode(BOARD_GPIO_KEY_CONFIG->base, BOARD_GPIO_KEY_CONFIG->pin, false); + /* Clear the interrupt state */ + GPIO_ClearStatusFlag(BOARD_GPIO_KEY_CONFIG->base, BOARD_GPIO_KEY_CONFIG->pin); + + RDC_SEMAPHORE_Unlock(BOARD_GPIO_KEY_RDC_PDAP); + + xSemaphoreGiveFromISR(xSemaphore, &xHigherPriorityTaskWoken); +} +#endif + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/gpio_ctrl.h b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/gpio_ctrl.h new file mode 100644 index 0000000..a61a017 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/gpio_ctrl.h @@ -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. + */ + +#ifndef __GPIO_CTRL_H__ +#define __GPIO_CTRL_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Initialize GPIO controller. + */ +void GPIO_Ctrl_Init(void); + +/*! + * @brief Toggle LED on/off status + */ +void GPIO_Ctrl_ToggleLed(void); + +/*! + * @brief Wait user to press key + */ +void GPIO_Ctrl_WaitKeyPressed(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __GPIO_CTRL_H__ */ +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/gpt_timer.c b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/gpt_timer.c new file mode 100644 index 0000000..4b035cb --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/gpt_timer.c @@ -0,0 +1,117 @@ +/* + * 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. + */ +/**************************************************************************** +* +* Comments: +* This file contains the functions which write and read the SPI memories +* using the ECSPI driver in interrupt mode. +* +****************************************************************************/ + +#include "FreeRTOS.h" +#include "semphr.h" +#include "gpt.h" +#include "gpt_timer.h" +#include "board.h" + +static SemaphoreHandle_t xSemaphore; + +void GPT_Timer_Init() +{ + gpt_mode_config_t config = { + .freeRun = false, + .waitEnable = true, + .stopEnable = true, + .dozeEnable = true, + .dbgEnable = false, + .enableMode = true + }; + + xSemaphore = xSemaphoreCreateBinary(); + + /* Initialize GPT module */ + GPT_Init(BOARD_GPTA_BASEADDR, &config); + + /* Set GPT clock source to 24M OSC */ + GPT_SetClockSource(BOARD_GPTA_BASEADDR, gptClockSourceOsc); + + /* Set GPT interrupt priority 3 */ + NVIC_SetPriority(BOARD_GPTA_IRQ_NUM, 3); + + /* Enable NVIC interrupt */ + NVIC_EnableIRQ(BOARD_GPTA_IRQ_NUM); +} + +void GPT_Timer_Delay(uint32_t ms) +{ + uint64_t counter = 24000 * ms; /* First get the counter needed by delay time */ + uint32_t high; + uint32_t div24m, div; + + /* Get the value that exceed maximum register counter */ + high = (uint32_t)(counter >> 32); + + /* high could not exceed 24000, so that predivider is enough */ + div24m = high / 4096; /* We need PRESCALER24M only if high exceed PRESCALER maximum value */ + div = high / (div24m + 1); /* Get PRESCALER value */ + + /* Now set prescaler */ + GPT_SetOscPrescaler(BOARD_GPTA_BASEADDR, div24m); + GPT_SetPrescaler(BOARD_GPTA_BASEADDR, div); + + /* Set GPT compare value */ + GPT_SetOutputCompareValue(BOARD_GPTA_BASEADDR, gptOutputCompareChannel1, + (uint32_t)(counter / (div24m + 1) / (div + 1))); + + /* Enable GPT Output Compare1 interrupt */ + GPT_SetIntCmd(BOARD_GPTA_BASEADDR, gptStatusFlagOutputCompare1, true); + + /* GPT start */ + GPT_Enable(BOARD_GPTA_BASEADDR); + + /* Wait until GPT event happens. */ + xSemaphoreTake(xSemaphore, portMAX_DELAY); +} + +void BOARD_GPTA_HANDLER() +{ + BaseType_t xHigherPriorityTaskWoken; + + /* When GPT timeout, we disable GPT to make sure this is a oneshot event */ + GPT_Disable(BOARD_GPTA_BASEADDR); + GPT_SetIntCmd(BOARD_GPTA_BASEADDR, gptStatusFlagOutputCompare1, false); + GPT_ClearStatusFlag(BOARD_GPTA_BASEADDR, gptStatusFlagOutputCompare1); + + xSemaphoreGiveFromISR(xSemaphore, &xHigherPriorityTaskWoken); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/gpt_timer.h b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/gpt_timer.h new file mode 100644 index 0000000..db19ab6 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/gpt_timer.h @@ -0,0 +1,58 @@ +/* + * 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. + */ + +#ifndef __GPT_TIMER_H__ +#define __GPT_TIMER_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Initialize GPT timer, must be called before GPT_Timer_Delay(). + */ +void GPT_Timer_Init(void); + +/*! + * @brief Block task for some time with GPT, this timer is not multi-thread + * safe and could only called in one task. + * + * @param ms milliseconds to delay + */ +void GPT_Timer_Delay(uint32_t ms); + +#ifdef __cplusplus +} +#endif + +#endif /* __GPT_TIMER_H__ */ +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/hardware_init.c b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/hardware_init.c new file mode 100644 index 0000000..df4fbdb --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/hardware_init.c @@ -0,0 +1,76 @@ +/* + * 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 grasp board GPT exclusively */ + RDC_SetPdapAccess(RDC, BOARD_GPTA_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false); + + /* In this demo, we need to access RDC SEMAPHORE1 on this board */ + RDC_SetPdapAccess(RDC, rdcPdapSemaphore1, 0xFF, false, false); + + /* In this demo, we need to share board GPIO, we can set sreq argument to true + * when the peer core could also access GPIO with RDC_SEMAPHORE, or the peer + * core doesn't access the GPIO at all */ + RDC_SetPdapAccess(RDC, BOARD_GPIO_KEY_RDC_PDAP, 0xFF, false/*true*/, false); + + /* Enable PLL PFD0 for GPTA */ + CCM_ControlGate(CCM, ccmPllGateSys, ccmClockNeededRunWait); + CCM_ControlGate(CCM, ccmPllGatePfd0, ccmClockNeededRunWait); + + /* Select GPTA clock derived from PLL PFD0 */ + CCM_UpdateRoot(CCM, BOARD_GPTA_CCM_ROOT, ccmRootmuxGptSysPllPfd0, 0, 0); + /* Enable clock used by GPTA */ + CCM_EnableRoot(CCM, BOARD_GPTA_CCM_ROOT); + CCM_ControlGate(CCM, BOARD_GPTA_CCM_CCGR, ccmClockNeededRunWait); + + /* Enable RDC SEMAPHORE GATE needed in this demo */ + CCM_ControlGate(CCM, ccmCcgrGateSema1, ccmClockNeededRunWait); + + /* Enable gpio clock gate, led and key share same CCGR on this board */ + CCM_ControlGate(CCM, BOARD_GPIO_CCM_CCGR, ccmClockNeededRunWait); + + /* Configure gpio pin IOMUX */ + configure_gpio_pin(BOARD_GPIO_KEY_CONFIG); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/iar/blinking_imx_demo.ewd b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/iar/blinking_imx_demo.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/iar/blinking_imx_demo.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/imx7_colibri_m4/demo_apps/blinking_imx_demo/iar/blinking_imx_demo.ewp b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/iar/blinking_imx_demo.ewp new file mode 100644 index 0000000..a792984 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/iar/blinking_imx_demo.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 + + + + + + + + +freertos$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/MemMang/heap_2.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/croutine.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/event_groups.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/FreeRTOS.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/list.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/mpu_wrappers.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/portable.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/projdefs.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/queue.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/semphr.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/StackMacros.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/task.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/timers.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/croutine.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/event_groups.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/list.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/queue.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/tasks.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/timers.cstartup$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.hboard$PROJ_DIR$/../../../FreeRTOSConfig.h$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.c$PROJ_DIR$/../gpt_timer.c$PROJ_DIR$/../gpt_timer.h$PROJ_DIR$/../gpio_ctrl.c$PROJ_DIR$/../gpio_ctrl.hdriver$PROJ_DIR$/../../../../../platform/drivers/src/gpio_imx.c$PROJ_DIR$/../../../../../platform/drivers/inc/gpio_imx.h$PROJ_DIR$/../../../../../platform/drivers/src/gpt.c$PROJ_DIR$/../../../../../platform/drivers/inc/gpt.h$PROJ_DIR$/../../../../../platform/drivers/src/rdc_semaphore.c$PROJ_DIR$/../../../../../platform/drivers/inc/rdc_semaphore.h$PROJ_DIR$/../../../../../platform/drivers/src/uart_imx.c$PROJ_DIR$/../../../../../platform/drivers/inc/uart_imx.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.cutilities$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.h diff --git a/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/iar/blinking_imx_demo.eww b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/iar/blinking_imx_demo.eww new file mode 100644 index 0000000..fbc2405 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/iar/blinking_imx_demo.eww @@ -0,0 +1,4 @@ + + +allblinking_imx_demoReleaseblinking_imx_demoDebugReleaseblinking_imx_demoReleaseDebugblinking_imx_demoDebug +$WS_DIR$/blinking_imx_demo.ewp diff --git a/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/main.c b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/main.c new file mode 100644 index 0000000..6547ada --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/blinking_imx_demo/main.c @@ -0,0 +1,109 @@ +/* + * 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 "FreeRTOS.h" +#include "task.h" +#include "board.h" +#include "debug_console_imx.h" +#include "gpio_ctrl.h" +#include "gpt_timer.h" + +#define BLINKING_FREQ_MIN (100) + +static volatile uint32_t blinkingInterval = BLINKING_FREQ_MIN; + +/****************************************************************************** +* +* Function Name: ToggleTask +* Comments: this task is used to turn toggle on/off LED. +* +******************************************************************************/ +void ToggleTask(void *pvParameters) +{ + while (true) + { + GPIO_Ctrl_ToggleLed(); + /* Use GPT timer to get accurate delay */ + GPT_Timer_Delay(blinkingInterval); + } +} + +/****************************************************************************** +* +* Function Name: SwitchTask +* Comments: this task is used to change blinking frequency. +* +******************************************************************************/ +void SwitchTask(void *pvParameters) +{ + while (true) + { + PRINTF("\n\r====== Blinking interval %dms ======\n\r", blinkingInterval); + GPIO_Ctrl_WaitKeyPressed(); + blinkingInterval += 100; + if (blinkingInterval > 1000) + blinkingInterval = BLINKING_FREQ_MIN; + /* Delay for 1 second to avoid glitch */ + vTaskDelay(configTICK_RATE_HZ); + } +} + +/****************************************************************************** +* +* Function Name: main +* Comments: main function, toggle LED and switch the blinking frequency by key. +* +******************************************************************************/ +int main(void) +{ + /* Initialize board specified hardware. */ + hardware_init(); + + GPT_Timer_Init(); + GPIO_Ctrl_Init(); + + PRINTF("\n\r================= Blinking Demo ==================\n\r"); + + /* Create a the APP main task. */ + xTaskCreate(ToggleTask, "Toggle Task", configMINIMAL_STACK_SIZE, + NULL, tskIDLE_PRIORITY+1, NULL); + xTaskCreate(SwitchTask, "Switch Task", configMINIMAL_STACK_SIZE, + NULL, tskIDLE_PRIORITY+2, NULL); + + /* Start FreeRTOS scheduler. */ + vTaskStartScheduler(); + + /* should never reach this point. */ + while (true); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/CMakeLists.txt b/examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/CMakeLists.txt new file mode 100644 index 0000000..6066a4b --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/CMakeLists.txt @@ -0,0 +1,156 @@ +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}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F) + 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}/../../../../../rtos/FreeRTOS/Source/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F) + 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}/../../../../../rtos/FreeRTOS/Source/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(hello_world + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h" + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/MemMang/heap_2.c" + "${ProjDirPath}/../../../FreeRTOSConfig.h" + "${ProjDirPath}/../main.c" + "${ProjDirPath}/../../../../../platform/drivers/src/uart_imx.c" + "${ProjDirPath}/../../../../../platform/drivers/inc/uart_imx.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/croutine.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/event_groups.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/FreeRTOS.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/list.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/mpu_wrappers.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/portable.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/projdefs.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/queue.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/semphr.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/StackMacros.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/task.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/timers.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}/../../../../../rtos/FreeRTOS/Source/croutine.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/event_groups.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/list.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/queue.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/tasks.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/timers.c" + "${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/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/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" +) +SET_TARGET_PROPERTIES(hello_world PROPERTIES OUTPUT_NAME "hello_world.elf") + +TARGET_LINK_LIBRARIES(hello_world -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(hello_world m) +TARGET_LINK_LIBRARIES(hello_world c) +TARGET_LINK_LIBRARIES(hello_world gcc) +TARGET_LINK_LIBRARIES(hello_world nosys) +TARGET_LINK_LIBRARIES(hello_world -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/hello_world.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/hello_world.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET hello_world POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/hello_world.elf ${EXECUTABLE_OUTPUT_PATH}/hello_world.hex) +ADD_CUSTOM_COMMAND(TARGET hello_world POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/hello_world.elf ${EXECUTABLE_OUTPUT_PATH}/hello_world.bin) diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_all.bat b/examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_all.bat new file mode 100755 index 0000000..6d41d86 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/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/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_all.sh b/examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_all.sh new file mode 100755 index 0000000..ebb0c25 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/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/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_debug.bat b/examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_debug.bat new file mode 100755 index 0000000..bf3b902 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/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/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_debug.sh b/examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_debug.sh new file mode 100755 index 0000000..571868b --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/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/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_release.bat b/examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_release.bat new file mode 100755 index 0000000..e229a83 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/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/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_release.sh b/examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/build_release.sh new file mode 100755 index 0000000..035ce4e --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/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/imx7_colibri_m4/demo_apps/hello_world/armgcc/clean.bat b/examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/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/imx7_colibri_m4/demo_apps/hello_world/armgcc/clean.sh b/examples/imx7_colibri_m4/demo_apps/hello_world/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/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/imx7_colibri_m4/demo_apps/hello_world/ds5/.cproject b/examples/imx7_colibri_m4/demo_apps/hello_world/ds5/.cproject new file mode 100644 index 0000000..fa71f12 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world/ds5/.project b/examples/imx7_colibri_m4/demo_apps/hello_world/ds5/.project new file mode 100644 index 0000000..e92e518 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/ds5/.project @@ -0,0 +1,86 @@ + + + hello_world_imx7d_sdb_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 + + + freertos2virtual:/virtualfreertos/port.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.cfreertos2virtual:/virtualfreertos/portmacro.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.hstartup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sfreertos2virtual:/virtualfreertos/heap_2.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/portable/MemMang/heap_2.cboard2virtual:/virtualboard/FreeRTOSConfig.h1PARENT-3-PROJECT_LOC/FreeRTOSConfig.hsource2virtual:/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.hfreertos2virtual:/virtualfreertos/croutine.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/croutine.hfreertos2virtual:/virtualfreertos/event_groups.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/event_groups.hfreertos2virtual:/virtualfreertos/FreeRTOS.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/FreeRTOS.hfreertos2virtual:/virtualfreertos/list.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/list.hfreertos2virtual:/virtualfreertos/mpu_wrappers.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/mpu_wrappers.hfreertos2virtual:/virtualfreertos/portable.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/portable.hfreertos2virtual:/virtualfreertos/projdefs.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/projdefs.hfreertos2virtual:/virtualfreertos/queue.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/queue.hfreertos2virtual:/virtualfreertos/semphr.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/semphr.hfreertos2virtual:/virtualfreertos/StackMacros.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/StackMacros.hfreertos2virtual:/virtualfreertos/task.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/task.hfreertos2virtual:/virtualfreertos/timers.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/timers.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.hfreertos2virtual:/virtualfreertos/croutine.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/croutine.cfreertos2virtual:/virtualfreertos/event_groups.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/event_groups.cfreertos2virtual:/virtualfreertos/list.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/list.cfreertos2virtual:/virtualfreertos/queue.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/queue.cfreertos2virtual:/virtualfreertos/tasks.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/tasks.cfreertos2virtual:/virtualfreertos/timers.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/timers.csystem2virtual:/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.cutilities2virtual:/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.hstartup2virtual:/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.c + + + diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world/ds5/hello_world.wsd b/examples/imx7_colibri_m4/demo_apps/hello_world/ds5/hello_world.wsd new file mode 100644 index 0000000..018e52e --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/ds5/hello_world.wsd @@ -0,0 +1,9 @@ + + + + hello_world_imx7d_sdb_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world/ds5/makedir.bat b/examples/imx7_colibri_m4/demo_apps/hello_world/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world/hardware_init.c b/examples/imx7_colibri_m4/demo_apps/hello_world/hardware_init.c new file mode 100644 index 0000000..9081bfd --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/hardware_init.c @@ -0,0 +1,48 @@ +/* + * 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(); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world/iar/hello_world.ewd b/examples/imx7_colibri_m4/demo_apps/hello_world/iar/hello_world.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/iar/hello_world.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/imx7_colibri_m4/demo_apps/hello_world/iar/hello_world.ewp b/examples/imx7_colibri_m4/demo_apps/hello_world/iar/hello_world.ewp new file mode 100644 index 0000000..4eaffcf --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/iar/hello_world.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 + + + + + + + + +freertos$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/MemMang/heap_2.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/croutine.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/event_groups.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/FreeRTOS.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/list.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/mpu_wrappers.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/portable.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/projdefs.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/queue.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/semphr.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/StackMacros.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/task.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/timers.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/croutine.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/event_groups.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/list.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/queue.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/tasks.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/timers.cstartup$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.hboard$PROJ_DIR$/../../../FreeRTOSConfig.h$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.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.cutilities$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.h diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world/iar/hello_world.eww b/examples/imx7_colibri_m4/demo_apps/hello_world/iar/hello_world.eww new file mode 100644 index 0000000..18d140a --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/iar/hello_world.eww @@ -0,0 +1,4 @@ + + +allhello_worldReleasehello_worldDebugReleasehello_worldReleaseDebughello_worldDebug +$WS_DIR$/hello_world.ewp diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world/main.c b/examples/imx7_colibri_m4/demo_apps/hello_world/main.c new file mode 100644 index 0000000..e7a0986 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world/main.c @@ -0,0 +1,86 @@ +/* + * 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. + */ + +/////////////////////////////////////////////////////////////////////////////// +// Includes +/////////////////////////////////////////////////////////////////////////////// +#include "FreeRTOS.h" +#include "task.h" +#include "board.h" +#include "debug_console_imx.h" + +//////////////////////////////////////////////////////////////////////////////// +// Code +//////////////////////////////////////////////////////////////////////////////// + +/*! + * @brief A basic user-defined task + */ +void HelloTask(void *pvParameters) +{ + uint8_t receiveBuff; + + // Print the initial banner + PRINTF("\r\nHello World!\n\n\r"); + + while(1) + { + // Main routine that simply echoes received characters forever + + // First, get character + receiveBuff = GETCHAR(); + + // Now echo the received character + PUTCHAR(receiveBuff); + } +} + +/*! + * @brief Main function + */ +int main(void) +{ + // Initialize demo application pins setting and clock setting. + hardware_init(); + + // Create a demo task which will print Hello world and echo user's input. + xTaskCreate(HelloTask, "Print Task", configMINIMAL_STACK_SIZE, + NULL, tskIDLE_PRIORITY+1, NULL); + + // Start FreeRTOS scheduler. + vTaskStartScheduler(); + + // Should never reach this point. + while (true); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/CMakeLists.txt b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/CMakeLists.txt new file mode 100644 index 0000000..a5b36f5 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/CMakeLists.txt @@ -0,0 +1,156 @@ +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_QSPIA.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_QSPIA.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}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F) + 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}/../../../../../rtos/FreeRTOS/Source/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F) + 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}/../../../../../rtos/FreeRTOS/Source/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(hello_world_qspi + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h" + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/MemMang/heap_2.c" + "${ProjDirPath}/../../../FreeRTOSConfig.h" + "${ProjDirPath}/../../hello_world/main.c" + "${ProjDirPath}/../../../../../platform/drivers/src/uart_imx.c" + "${ProjDirPath}/../../../../../platform/drivers/inc/uart_imx.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/croutine.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/event_groups.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/FreeRTOS.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/list.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/mpu_wrappers.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/portable.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/projdefs.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/queue.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/semphr.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/StackMacros.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/task.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/timers.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}/../../../../../rtos/FreeRTOS/Source/croutine.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/event_groups.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/list.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/queue.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/tasks.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/timers.c" + "${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/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/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}/../../hello_world/hardware_init.c" +) +SET_TARGET_PROPERTIES(hello_world_qspi PROPERTIES OUTPUT_NAME "hello_world_qspi.elf") + +TARGET_LINK_LIBRARIES(hello_world_qspi -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(hello_world_qspi m) +TARGET_LINK_LIBRARIES(hello_world_qspi c) +TARGET_LINK_LIBRARIES(hello_world_qspi gcc) +TARGET_LINK_LIBRARIES(hello_world_qspi nosys) +TARGET_LINK_LIBRARIES(hello_world_qspi -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/hello_world_qspi.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/hello_world_qspi.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET hello_world_qspi POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/hello_world_qspi.elf ${EXECUTABLE_OUTPUT_PATH}/hello_world_qspi.hex) +ADD_CUSTOM_COMMAND(TARGET hello_world_qspi POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/hello_world_qspi.elf ${EXECUTABLE_OUTPUT_PATH}/hello_world_qspi.bin) diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_all.bat b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_all.bat new file mode 100755 index 0000000..6d41d86 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/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/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_all.sh b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_all.sh new file mode 100755 index 0000000..ebb0c25 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/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/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_debug.bat b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_debug.bat new file mode 100755 index 0000000..bf3b902 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/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/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_debug.sh b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_debug.sh new file mode 100755 index 0000000..571868b --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/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/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_release.bat b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_release.bat new file mode 100755 index 0000000..e229a83 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/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/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_release.sh b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/build_release.sh new file mode 100755 index 0000000..035ce4e --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/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/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/clean.bat b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/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/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/clean.sh b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/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/imx7_colibri_m4/demo_apps/hello_world_qspi/ds5/.cproject b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/ds5/.cproject new file mode 100644 index 0000000..8573cd9 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/ds5/.project b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/ds5/.project new file mode 100644 index 0000000..0b83895 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/ds5/.project @@ -0,0 +1,86 @@ + + + hello_world_qspi_imx7d_sdb_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 + + + freertos2virtual:/virtualfreertos/port.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.cfreertos2virtual:/virtualfreertos/portmacro.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.hstartup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sfreertos2virtual:/virtualfreertos/heap_2.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/portable/MemMang/heap_2.cboard2virtual:/virtualboard/FreeRTOSConfig.h1PARENT-3-PROJECT_LOC/FreeRTOSConfig.hsource2virtual:/virtualsource/main.c1PARENT-2-PROJECT_LOC/hello_world/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.hfreertos2virtual:/virtualfreertos/croutine.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/croutine.hfreertos2virtual:/virtualfreertos/event_groups.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/event_groups.hfreertos2virtual:/virtualfreertos/FreeRTOS.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/FreeRTOS.hfreertos2virtual:/virtualfreertos/list.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/list.hfreertos2virtual:/virtualfreertos/mpu_wrappers.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/mpu_wrappers.hfreertos2virtual:/virtualfreertos/portable.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/portable.hfreertos2virtual:/virtualfreertos/projdefs.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/projdefs.hfreertos2virtual:/virtualfreertos/queue.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/queue.hfreertos2virtual:/virtualfreertos/semphr.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/semphr.hfreertos2virtual:/virtualfreertos/StackMacros.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/StackMacros.hfreertos2virtual:/virtualfreertos/task.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/task.hfreertos2virtual:/virtualfreertos/timers.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/timers.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.hfreertos2virtual:/virtualfreertos/croutine.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/croutine.cfreertos2virtual:/virtualfreertos/event_groups.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/event_groups.cfreertos2virtual:/virtualfreertos/list.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/list.cfreertos2virtual:/virtualfreertos/queue.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/queue.cfreertos2virtual:/virtualfreertos/tasks.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/tasks.cfreertos2virtual:/virtualfreertos/timers.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/timers.csystem2virtual:/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.cutilities2virtual:/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.hstartup2virtual:/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-2-PROJECT_LOC/hello_world/hardware_init.c + + + diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/ds5/hello_world_qspi.wsd b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/ds5/hello_world_qspi.wsd new file mode 100644 index 0000000..2876c83 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/ds5/hello_world_qspi.wsd @@ -0,0 +1,9 @@ + + + + hello_world_qspi_imx7d_sdb_m4.truedebugfalsereleasefalse + + + + + diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/ds5/makedir.bat b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/iar/hello_world_qspi.ewd b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/iar/hello_world_qspi.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/iar/hello_world_qspi.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/imx7_colibri_m4/demo_apps/hello_world_qspi/iar/hello_world_qspi.ewp b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/iar/hello_world_qspi.ewp new file mode 100644 index 0000000..d1b06d4 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/iar/hello_world_qspi.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 + + + + + + + + +freertos$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/MemMang/heap_2.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/croutine.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/event_groups.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/FreeRTOS.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/list.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/mpu_wrappers.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/portable.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/projdefs.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/queue.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/semphr.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/StackMacros.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/task.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/timers.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/croutine.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/event_groups.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/list.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/queue.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/tasks.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/timers.cstartup$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.hboard$PROJ_DIR$/../../../FreeRTOSConfig.h$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$/../../hello_world/hardware_init.csource$PROJ_DIR$/../../hello_world/main.cdriver$PROJ_DIR$/../../../../../platform/drivers/src/uart_imx.c$PROJ_DIR$/../../../../../platform/drivers/inc/uart_imx.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.cutilities$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.h diff --git a/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/iar/hello_world_qspi.eww b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/iar/hello_world_qspi.eww new file mode 100644 index 0000000..aeec508 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/hello_world_qspi/iar/hello_world_qspi.eww @@ -0,0 +1,4 @@ + + +allhello_world_qspiDebughello_world_qspiReleaseDebughello_world_qspiDebugReleasehello_world_qspiRelease +$WS_DIR$/hello_world_qspi.ewp diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/CMakeLists.txt b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/CMakeLists.txt new file mode 100644 index 0000000..e057d9f --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/CMakeLists.txt @@ -0,0 +1,185 @@ +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}/../../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F) + 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}/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../middleware/multicore/open-amp) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F) + 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}/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../middleware/multicore/open-amp) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(rpmsg_pingpong_example + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h" + "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/portable/MemMang/heap_2.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4/platform.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4/plat_porting.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/rpmsg/rpmsg.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/common/hil/hil.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/common/llist/llist.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/common/shm/sh_mem.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/porting/config/config.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/porting/env/env.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/rpmsg/rpmsg_core.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/virtio/virtio.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/virtio/virtio_ring.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/virtio/virtqueue.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/croutine.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/event_groups.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/FreeRTOS.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/list.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/mpu_wrappers.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/portable.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/projdefs.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/queue.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/semphr.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/StackMacros.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/task.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/timers.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}/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4/platform.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4/platform_info.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/common/hil/hil.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/common/llist/llist.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/common/shm/sh_mem.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/porting/config/config.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/porting/env/freertos_env.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/rpmsg/remote_device.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/rpmsg/rpmsg.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/rpmsg/rpmsg_core.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/virtio/virtio.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/virtio/virtqueue.c" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/croutine.c" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/event_groups.c" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/list.c" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/queue.c" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/tasks.c" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/timers.c" + "${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/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/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}/../pingpong.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/uart_imx.c" + "${ProjDirPath}/../../../../../../platform/drivers/inc/uart_imx.h" + "${ProjDirPath}/../../../../../../platform/drivers/src/mu_imx.c" + "${ProjDirPath}/../../../../../../platform/drivers/inc/mu_imx.h" +) +SET_TARGET_PROPERTIES(rpmsg_pingpong_example PROPERTIES OUTPUT_NAME "rpmsg_pingpong_example.elf") + +TARGET_LINK_LIBRARIES(rpmsg_pingpong_example -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(rpmsg_pingpong_example m) +TARGET_LINK_LIBRARIES(rpmsg_pingpong_example c) +TARGET_LINK_LIBRARIES(rpmsg_pingpong_example gcc) +TARGET_LINK_LIBRARIES(rpmsg_pingpong_example nosys) +TARGET_LINK_LIBRARIES(rpmsg_pingpong_example -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/rpmsg_pingpong_example.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/rpmsg_pingpong_example.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET rpmsg_pingpong_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/rpmsg_pingpong_example.elf ${EXECUTABLE_OUTPUT_PATH}/rpmsg_pingpong_example.hex) +ADD_CUSTOM_COMMAND(TARGET rpmsg_pingpong_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/rpmsg_pingpong_example.elf ${EXECUTABLE_OUTPUT_PATH}/rpmsg_pingpong_example.bin) diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_all.bat b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_all.bat new file mode 100755 index 0000000..0cf721f --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/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/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_all.sh b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_all.sh new file mode 100755 index 0000000..3827529 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/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/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_debug.bat b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_debug.bat new file mode 100755 index 0000000..e9ccfdd --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/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/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_debug.sh b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_debug.sh new file mode 100755 index 0000000..effd076 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/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/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_release.bat b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_release.bat new file mode 100755 index 0000000..0759349 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/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/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_release.sh b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/build_release.sh new file mode 100755 index 0000000..a12067d --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/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/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/clean.bat b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/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/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/clean.sh b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/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/imx7_colibri_m4/demo_apps/rpmsg/pingpong/ds5/.cproject b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/ds5/.cproject new file mode 100644 index 0000000..a8c9b7d --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/ds5/.project b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/ds5/.project new file mode 100644 index 0000000..1d92d06 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/ds5/.project @@ -0,0 +1,86 @@ + + + rpmsg_pingpong_example_imx7d_sdb_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 + + + freertos2virtual:/virtualfreertos/port.c1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.cfreertos2virtual:/virtualfreertos/portmacro.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.hstartup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sfreertos2virtual:/virtualfreertos/heap_2.c1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/portable/MemMang/heap_2.crpmsg2virtual:/virtualrpmsg/platform.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/porting/imx7d_m4/platform.hrpmsg2virtual:/virtualrpmsg/plat_porting.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/porting/imx7d_m4/plat_porting.hrpmsg2virtual:/virtualrpmsg/rpmsg.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/rpmsg/rpmsg.hrpmsg2virtual:/virtualrpmsg/hil.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/common/hil/hil.hrpmsg2virtual:/virtualrpmsg/llist.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/common/llist/llist.hrpmsg2virtual:/virtualrpmsg/sh_mem.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/common/shm/sh_mem.hrpmsg2virtual:/virtualrpmsg/config.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/porting/config/config.hrpmsg2virtual:/virtualrpmsg/env.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/porting/env/env.hrpmsg2virtual:/virtualrpmsg/rpmsg_core.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/rpmsg/rpmsg_core.hrpmsg2virtual:/virtualrpmsg/virtio.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/virtio/virtio.hrpmsg2virtual:/virtualrpmsg/virtio_ring.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/virtio/virtio_ring.hrpmsg2virtual:/virtualrpmsg/virtqueue.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/virtio/virtqueue.hfreertos2virtual:/virtualfreertos/croutine.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/croutine.hfreertos2virtual:/virtualfreertos/event_groups.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/event_groups.hfreertos2virtual:/virtualfreertos/FreeRTOS.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/FreeRTOS.hfreertos2virtual:/virtualfreertos/list.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/list.hfreertos2virtual:/virtualfreertos/mpu_wrappers.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/mpu_wrappers.hfreertos2virtual:/virtualfreertos/portable.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/portable.hfreertos2virtual:/virtualfreertos/projdefs.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/projdefs.hfreertos2virtual:/virtualfreertos/queue.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/queue.hfreertos2virtual:/virtualfreertos/semphr.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/semphr.hfreertos2virtual:/virtualfreertos/StackMacros.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/StackMacros.hfreertos2virtual:/virtualfreertos/task.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/task.hfreertos2virtual:/virtualfreertos/timers.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/timers.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.hrpmsg2virtual:/virtualrpmsg/platform.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/porting/imx7d_m4/platform.crpmsg2virtual:/virtualrpmsg/platform_info.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/porting/imx7d_m4/platform_info.crpmsg2virtual:/virtualrpmsg/hil.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/common/hil/hil.crpmsg2virtual:/virtualrpmsg/llist.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/common/llist/llist.crpmsg2virtual:/virtualrpmsg/sh_mem.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/common/shm/sh_mem.crpmsg2virtual:/virtualrpmsg/config.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/porting/config/config.crpmsg2virtual:/virtualrpmsg/freertos_env.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/porting/env/freertos_env.crpmsg2virtual:/virtualrpmsg/remote_device.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/rpmsg/remote_device.crpmsg2virtual:/virtualrpmsg/rpmsg.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/rpmsg/rpmsg.crpmsg2virtual:/virtualrpmsg/rpmsg_core.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/rpmsg/rpmsg_core.crpmsg2virtual:/virtualrpmsg/virtio.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/virtio/virtio.crpmsg2virtual:/virtualrpmsg/virtqueue.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/virtio/virtqueue.cfreertos2virtual:/virtualfreertos/croutine.c1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/croutine.cfreertos2virtual:/virtualfreertos/event_groups.c1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/event_groups.cfreertos2virtual:/virtualfreertos/list.c1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/list.cfreertos2virtual:/virtualfreertos/queue.c1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/queue.cfreertos2virtual:/virtualfreertos/tasks.c1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/tasks.cfreertos2virtual:/virtualfreertos/timers.c1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/timers.csystem2virtual:/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.cutilities2virtual:/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.hstartup2virtual:/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/pingpong.c1PARENT-1-PROJECT_LOC/pingpong.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.hdriver2virtual:/virtualdriver/mu_imx.c1PARENT-6-PROJECT_LOC/platform/drivers/src/mu_imx.cdriver2virtual:/virtualdriver/mu_imx.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/mu_imx.h + + + diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/ds5/makedir.bat b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/ds5/rpmsg_pingpong_example.wsd b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/ds5/rpmsg_pingpong_example.wsd new file mode 100644 index 0000000..1e40fa1 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/ds5/rpmsg_pingpong_example.wsd @@ -0,0 +1,9 @@ + + + + rpmsg_pingpong_example_imx7d_sdb_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/hardware_init.c b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/hardware_init.c new file mode 100644 index 0000000..aa69475 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/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(); + + /* RDC MU*/ + RDC_SetPdapAccess(RDC, BOARD_MU_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false); + + /* Enable clock gate for MU*/ + CCM_ControlGate(CCM, BOARD_MU_CCM_CCGR, ccmClockNeededRun); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/iar/rpmsg_pingpong_example.ewd b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/iar/rpmsg_pingpong_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/iar/rpmsg_pingpong_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/imx7_colibri_m4/demo_apps/rpmsg/pingpong/iar/rpmsg_pingpong_example.ewp b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/iar/rpmsg_pingpong_example.ewp new file mode 100644 index 0000000..f7017c4 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/iar/rpmsg_pingpong_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 + + + + + + + + +freertos$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/portable/MemMang/heap_2.c$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/croutine.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/event_groups.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/FreeRTOS.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/list.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/mpu_wrappers.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/portable.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/projdefs.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/queue.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/semphr.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/StackMacros.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/task.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/timers.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/croutine.c$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/event_groups.c$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/list.c$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/queue.c$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/tasks.c$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/timers.cstartup$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.hrpmsg$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4/platform.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4/plat_porting.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/rpmsg/rpmsg.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/common/hil/hil.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/common/llist/llist.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/common/shm/sh_mem.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/porting/config/config.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/porting/env/env.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/rpmsg/rpmsg_core.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/virtio/virtio.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/virtio/virtio_ring.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/virtio/virtqueue.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4/platform.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4/platform_info.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/common/hil/hil.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/common/llist/llist.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/common/shm/sh_mem.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/porting/config/config.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/porting/env/freertos_env.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/rpmsg/remote_device.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/rpmsg/rpmsg.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/rpmsg/rpmsg_core.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/virtio/virtio.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/virtio/virtqueue.csystem$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.cutilities$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.hboard$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$/../pingpong.cdriver$PROJ_DIR$/../../../../../../platform/drivers/src/uart_imx.c$PROJ_DIR$/../../../../../../platform/drivers/inc/uart_imx.h$PROJ_DIR$/../../../../../../platform/drivers/src/mu_imx.c$PROJ_DIR$/../../../../../../platform/drivers/inc/mu_imx.h diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/iar/rpmsg_pingpong_example.eww b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/iar/rpmsg_pingpong_example.eww new file mode 100644 index 0000000..748cbcf --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/iar/rpmsg_pingpong_example.eww @@ -0,0 +1,4 @@ + + +allrpmsg_pingpong_exampleReleaserpmsg_pingpong_exampleDebugReleaserpmsg_pingpong_exampleReleaseDebugrpmsg_pingpong_exampleDebug +$WS_DIR$/rpmsg_pingpong_example.ewp diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/pingpong.c b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/pingpong.c new file mode 100644 index 0000000..4b8b82e --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/pingpong/pingpong.c @@ -0,0 +1,155 @@ +/* + * 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 "FreeRTOS.h" +#include "task.h" +#include "semphr.h" +#include "board.h" +#include "rpmsg/rpmsg.h" +#include "debug_console_imx.h" +#include "mu_imx.h" +#include "plat_porting.h" + +/* + * APP decided interrupt priority + */ +#define APP_MU_IRQ_PRIORITY 3 + +/* Internal functions */ +static void rpmsg_channel_created(struct rpmsg_channel *rp_chnl); +static void rpmsg_channel_deleted(struct rpmsg_channel *rp_chnl); +static void rpmsg_read_cb(struct rpmsg_channel *, void *, int, void *, unsigned long); + +/* Globals */ +static struct remote_device *rdev; +static struct rpmsg_channel *app_chnl; +static uint32_t msg_var; +static SemaphoreHandle_t app_sema; + +/*! + * @brief A basic RPMSG task + */ +void PingPongTask(void *pvParameters) +{ + PRINTF("RPMSG PingPong Demo...\r\n"); + + app_sema = xSemaphoreCreateCounting(2, 0); + + PRINTF("RPMSG Init as Remote\r\n"); + /* + * RPMSG Init as REMOTE + */ + rpmsg_init(0, &rdev, rpmsg_channel_created, rpmsg_channel_deleted, rpmsg_read_cb, RPMSG_MASTER); + + /* + * rpmsg_channel_created will post the first semaphore + */ + xSemaphoreTake(app_sema, portMAX_DELAY); + PRINTF("Name service handshake is done, M4 has setup a rpmsg channel [%d ---> %d]\r\n", app_chnl->src, app_chnl->dst); + + + /* + * pingpong demo loop + */ + for (;;) { + xSemaphoreTake(app_sema, portMAX_DELAY); + PRINTF("Get Data From A7 : %d\r\n", msg_var); + msg_var++; + rpmsg_send(app_chnl, (void*)&msg_var, sizeof(uint32_t)); + } +} + + +/* + * MU Interrrupt ISR + */ +void BOARD_MU_HANDLER(void) +{ + /* + * calls into rpmsg_handler provided by middleware + */ + rpmsg_handler(); +} + + +int main(void) +{ + hardware_init(); + + /* + * Prepare for the MU Interrupt + * MU must be initialized before rpmsg init is called + */ + MU_Init(BOARD_MU_BASE_ADDR); + NVIC_SetPriority(BOARD_MU_IRQ_NUM, APP_MU_IRQ_PRIORITY); + NVIC_EnableIRQ(BOARD_MU_IRQ_NUM); + + // Create a demo task which will print Hello world and echo user's input. + xTaskCreate(PingPongTask, "Ping Pong Task", configMINIMAL_STACK_SIZE, + NULL, tskIDLE_PRIORITY+1, NULL); + + // Start FreeRTOS scheduler. + vTaskStartScheduler(); + + // Should never reach this point. + while (true); +} + +/* rpmsg_rx_callback will call into this for a channel creation event*/ +static void rpmsg_channel_created(struct rpmsg_channel *rp_chnl) +{ + /* + * we should give the created rp_chnl handler to app layer + */ + app_chnl = rp_chnl; + + /* + * sync to application layer + */ + xSemaphoreGiveFromISR(app_sema, NULL); +} + +static void rpmsg_channel_deleted(struct rpmsg_channel *rp_chnl) +{ + rpmsg_destroy_ept(rp_chnl->rp_ept); +} + +static void rpmsg_read_cb(struct rpmsg_channel *rp_chnl, void *data, int len, + void * priv, unsigned long src) +{ + msg_var = *(uint32_t*)data; + /* + * sync to application layer + */ + xSemaphoreGiveFromISR(app_sema, NULL); +} +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/CMakeLists.txt b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/CMakeLists.txt new file mode 100644 index 0000000..cfdf394 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/CMakeLists.txt @@ -0,0 +1,185 @@ +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}/../../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F) + 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}/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../middleware/multicore/open-amp) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F) + 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}/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../../middleware/multicore/open-amp) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(rpmsg_str_echo_example + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h" + "${ProjDirPath}/../../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/portable/MemMang/heap_2.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4/platform.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4/plat_porting.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/rpmsg/rpmsg.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/common/hil/hil.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/common/llist/llist.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/common/shm/sh_mem.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/porting/config/config.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/porting/env/env.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/rpmsg/rpmsg_core.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/virtio/virtio.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/virtio/virtio_ring.h" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/virtio/virtqueue.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/croutine.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/event_groups.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/FreeRTOS.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/list.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/mpu_wrappers.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/portable.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/projdefs.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/queue.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/semphr.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/StackMacros.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/task.h" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/include/timers.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}/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4/platform.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4/platform_info.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/common/hil/hil.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/common/llist/llist.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/common/shm/sh_mem.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/porting/config/config.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/porting/env/freertos_env.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/rpmsg/remote_device.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/rpmsg/rpmsg.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/rpmsg/rpmsg_core.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/virtio/virtio.c" + "${ProjDirPath}/../../../../../../middleware/multicore/open-amp/virtio/virtqueue.c" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/croutine.c" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/event_groups.c" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/list.c" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/queue.c" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/tasks.c" + "${ProjDirPath}/../../../../../../rtos/FreeRTOS/Source/timers.c" + "${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/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/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}/../str_echo.c" + "${ProjDirPath}/../../../../../../platform/drivers/src/uart_imx.c" + "${ProjDirPath}/../../../../../../platform/drivers/inc/uart_imx.h" + "${ProjDirPath}/../../../../../../platform/drivers/src/mu_imx.c" + "${ProjDirPath}/../../../../../../platform/drivers/inc/mu_imx.h" +) +SET_TARGET_PROPERTIES(rpmsg_str_echo_example PROPERTIES OUTPUT_NAME "rpmsg_str_echo_example.elf") + +TARGET_LINK_LIBRARIES(rpmsg_str_echo_example -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(rpmsg_str_echo_example m) +TARGET_LINK_LIBRARIES(rpmsg_str_echo_example c) +TARGET_LINK_LIBRARIES(rpmsg_str_echo_example gcc) +TARGET_LINK_LIBRARIES(rpmsg_str_echo_example nosys) +TARGET_LINK_LIBRARIES(rpmsg_str_echo_example -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/rpmsg_str_echo_example.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/rpmsg_str_echo_example.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET rpmsg_str_echo_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/rpmsg_str_echo_example.elf ${EXECUTABLE_OUTPUT_PATH}/rpmsg_str_echo_example.hex) +ADD_CUSTOM_COMMAND(TARGET rpmsg_str_echo_example POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/rpmsg_str_echo_example.elf ${EXECUTABLE_OUTPUT_PATH}/rpmsg_str_echo_example.bin) diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_all.bat b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_all.bat new file mode 100755 index 0000000..0cf721f --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/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/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_all.sh b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_all.sh new file mode 100755 index 0000000..3827529 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/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/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_debug.bat b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_debug.bat new file mode 100755 index 0000000..e9ccfdd --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/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/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_debug.sh b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_debug.sh new file mode 100755 index 0000000..effd076 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/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/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_release.bat b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_release.bat new file mode 100755 index 0000000..0759349 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/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/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_release.sh b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/build_release.sh new file mode 100755 index 0000000..a12067d --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/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/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/clean.bat b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/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/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/clean.sh b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/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/imx7_colibri_m4/demo_apps/rpmsg/str_echo/ds5/.cproject b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/ds5/.cproject new file mode 100644 index 0000000..97441ea --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/ds5/.project b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/ds5/.project new file mode 100644 index 0000000..8fb75a6 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/ds5/.project @@ -0,0 +1,86 @@ + + + rpmsg_str_echo_example_imx7d_sdb_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 + + + freertos2virtual:/virtualfreertos/port.c1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.cfreertos2virtual:/virtualfreertos/portmacro.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.hstartup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-6-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sfreertos2virtual:/virtualfreertos/heap_2.c1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/portable/MemMang/heap_2.crpmsg2virtual:/virtualrpmsg/platform.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/porting/imx7d_m4/platform.hrpmsg2virtual:/virtualrpmsg/plat_porting.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/porting/imx7d_m4/plat_porting.hrpmsg2virtual:/virtualrpmsg/rpmsg.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/rpmsg/rpmsg.hrpmsg2virtual:/virtualrpmsg/hil.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/common/hil/hil.hrpmsg2virtual:/virtualrpmsg/llist.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/common/llist/llist.hrpmsg2virtual:/virtualrpmsg/sh_mem.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/common/shm/sh_mem.hrpmsg2virtual:/virtualrpmsg/config.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/porting/config/config.hrpmsg2virtual:/virtualrpmsg/env.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/porting/env/env.hrpmsg2virtual:/virtualrpmsg/rpmsg_core.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/rpmsg/rpmsg_core.hrpmsg2virtual:/virtualrpmsg/virtio.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/virtio/virtio.hrpmsg2virtual:/virtualrpmsg/virtio_ring.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/virtio/virtio_ring.hrpmsg2virtual:/virtualrpmsg/virtqueue.h1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/virtio/virtqueue.hfreertos2virtual:/virtualfreertos/croutine.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/croutine.hfreertos2virtual:/virtualfreertos/event_groups.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/event_groups.hfreertos2virtual:/virtualfreertos/FreeRTOS.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/FreeRTOS.hfreertos2virtual:/virtualfreertos/list.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/list.hfreertos2virtual:/virtualfreertos/mpu_wrappers.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/mpu_wrappers.hfreertos2virtual:/virtualfreertos/portable.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/portable.hfreertos2virtual:/virtualfreertos/projdefs.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/projdefs.hfreertos2virtual:/virtualfreertos/queue.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/queue.hfreertos2virtual:/virtualfreertos/semphr.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/semphr.hfreertos2virtual:/virtualfreertos/StackMacros.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/StackMacros.hfreertos2virtual:/virtualfreertos/task.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/task.hfreertos2virtual:/virtualfreertos/timers.h1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/include/timers.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.hrpmsg2virtual:/virtualrpmsg/platform.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/porting/imx7d_m4/platform.crpmsg2virtual:/virtualrpmsg/platform_info.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/porting/imx7d_m4/platform_info.crpmsg2virtual:/virtualrpmsg/hil.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/common/hil/hil.crpmsg2virtual:/virtualrpmsg/llist.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/common/llist/llist.crpmsg2virtual:/virtualrpmsg/sh_mem.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/common/shm/sh_mem.crpmsg2virtual:/virtualrpmsg/config.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/porting/config/config.crpmsg2virtual:/virtualrpmsg/freertos_env.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/porting/env/freertos_env.crpmsg2virtual:/virtualrpmsg/remote_device.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/rpmsg/remote_device.crpmsg2virtual:/virtualrpmsg/rpmsg.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/rpmsg/rpmsg.crpmsg2virtual:/virtualrpmsg/rpmsg_core.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/rpmsg/rpmsg_core.crpmsg2virtual:/virtualrpmsg/virtio.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/virtio/virtio.crpmsg2virtual:/virtualrpmsg/virtqueue.c1PARENT-6-PROJECT_LOC/middleware/multicore/open-amp/virtio/virtqueue.cfreertos2virtual:/virtualfreertos/croutine.c1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/croutine.cfreertos2virtual:/virtualfreertos/event_groups.c1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/event_groups.cfreertos2virtual:/virtualfreertos/list.c1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/list.cfreertos2virtual:/virtualfreertos/queue.c1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/queue.cfreertos2virtual:/virtualfreertos/tasks.c1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/tasks.cfreertos2virtual:/virtualfreertos/timers.c1PARENT-6-PROJECT_LOC/rtos/FreeRTOS/Source/timers.csystem2virtual:/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.cutilities2virtual:/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.hstartup2virtual:/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/str_echo.c1PARENT-1-PROJECT_LOC/str_echo.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.hdriver2virtual:/virtualdriver/mu_imx.c1PARENT-6-PROJECT_LOC/platform/drivers/src/mu_imx.cdriver2virtual:/virtualdriver/mu_imx.h1PARENT-6-PROJECT_LOC/platform/drivers/inc/mu_imx.h + + + diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/ds5/makedir.bat b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/ds5/rpmsg_str_echo_example.wsd b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/ds5/rpmsg_str_echo_example.wsd new file mode 100644 index 0000000..b54d9e7 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/ds5/rpmsg_str_echo_example.wsd @@ -0,0 +1,9 @@ + + + + rpmsg_str_echo_example_imx7d_sdb_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/hardware_init.c b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/hardware_init.c new file mode 100644 index 0000000..aa69475 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/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(); + + /* RDC MU*/ + RDC_SetPdapAccess(RDC, BOARD_MU_RDC_PDAP, 3 << (BOARD_DOMAIN_ID * 2), false, false); + + /* Enable clock gate for MU*/ + CCM_ControlGate(CCM, BOARD_MU_CCM_CCGR, ccmClockNeededRun); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/iar/rpmsg_str_echo_example.ewd b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/iar/rpmsg_str_echo_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/iar/rpmsg_str_echo_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/imx7_colibri_m4/demo_apps/rpmsg/str_echo/iar/rpmsg_str_echo_example.ewp b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/iar/rpmsg_str_echo_example.ewp new file mode 100644 index 0000000..da4e5e6 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/iar/rpmsg_str_echo_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 + + + + + + + + +freertos$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/portable/MemMang/heap_2.c$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/croutine.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/event_groups.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/FreeRTOS.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/list.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/mpu_wrappers.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/portable.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/projdefs.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/queue.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/semphr.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/StackMacros.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/task.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/include/timers.h$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/croutine.c$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/event_groups.c$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/list.c$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/queue.c$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/tasks.c$PROJ_DIR$/../../../../../../rtos/FreeRTOS/Source/timers.cstartup$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.hrpmsg$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4/platform.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4/plat_porting.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/rpmsg/rpmsg.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/common/hil/hil.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/common/llist/llist.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/common/shm/sh_mem.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/porting/config/config.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/porting/env/env.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/rpmsg/rpmsg_core.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/virtio/virtio.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/virtio/virtio_ring.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/virtio/virtqueue.h$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4/platform.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/porting/imx7d_m4/platform_info.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/common/hil/hil.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/common/llist/llist.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/common/shm/sh_mem.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/porting/config/config.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/porting/env/freertos_env.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/rpmsg/remote_device.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/rpmsg/rpmsg.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/rpmsg/rpmsg_core.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/virtio/virtio.c$PROJ_DIR$/../../../../../../middleware/multicore/open-amp/virtio/virtqueue.csystem$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.cutilities$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.hboard$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$/../str_echo.cdriver$PROJ_DIR$/../../../../../../platform/drivers/src/uart_imx.c$PROJ_DIR$/../../../../../../platform/drivers/inc/uart_imx.h$PROJ_DIR$/../../../../../../platform/drivers/src/mu_imx.c$PROJ_DIR$/../../../../../../platform/drivers/inc/mu_imx.h diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/iar/rpmsg_str_echo_example.eww b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/iar/rpmsg_str_echo_example.eww new file mode 100644 index 0000000..16d90b2 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/iar/rpmsg_str_echo_example.eww @@ -0,0 +1,4 @@ + + +allrpmsg_str_echo_exampleReleaserpmsg_str_echo_exampleDebugReleaserpmsg_str_echo_exampleReleaseDebugrpmsg_str_echo_exampleDebug +$WS_DIR$/rpmsg_str_echo_example.ewp diff --git a/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/str_echo.c b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/str_echo.c new file mode 100644 index 0000000..7a778fc --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/rpmsg/str_echo/str_echo.c @@ -0,0 +1,209 @@ +/* + * 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 "FreeRTOS.h" +#include "task.h" +#include "semphr.h" +#include "string.h" +#include "assert.h" +#include "board.h" +#include "rpmsg/rpmsg.h" +#include "debug_console_imx.h" +#include "mu_imx.h" +#include "plat_porting.h" + +/* + * APP decided interrupt priority + */ +#define APP_MU_IRQ_PRIORITY 3 + +#define MAX_STRING_SIZE 496 /* Maximum size to hold the data A7 gives */ + +/* + * For the most worst case, master will send 3 consecutive messages which remote + * do not process. + * The synchronization between remote and master is that each time endpoint callback + * is called, the MU Receive interrupt is temperorily disabled. Until the next time + * remote consumes the message, the interrupt will not be enabled again. + * When the interrupt is not enabled, Master can not send the notify, it will blocks + * there and can not send further message. + * In the worst case, master send the first message, it triggles the ISR in remote + * side, remote ISR clear the MU status bit so master can send the second message + * and notify again, master can continue to send the 3rd message but will blocks + * when trying to notify. Meanwhile, remote side is still in the first ISR which + * has a loop to receive all the 3 messages. + * Master is blocked and can not send the 4th message, remote side ISR copies all + * this 3 message to app buffer and informs the app layer to consume them. After + * a message is consumed, the ISR is enabled again and the second notify is received. + * This unblocks the master to complete the 3rd notify and send the next message. + * The 4th notify will not complete until remote consumes the second message. + * The situation goes on and we can see application layer need a maximum size 3 + * buffer to hold the unconsumed messages. STRING_BUFFER_CNT is therefore set to 3 + */ +#define STRING_BUFFER_CNT 3 + +/* Internal functions */ +static void rpmsg_channel_created(struct rpmsg_channel *rp_chnl); +static void rpmsg_channel_deleted(struct rpmsg_channel *rp_chnl); +static void rpmsg_read_cb(struct rpmsg_channel *, void *, int, void *, unsigned long); + +/* Globals */ +static struct remote_device *rdev; +static struct rpmsg_channel *app_chnl; +static char strVar[STRING_BUFFER_CNT][MAX_STRING_SIZE + 1]; +static uint8_t app_idx = 0; +static uint8_t handler_idx = 0; +static SemaphoreHandle_t app_sema; + +/*! + * @brief A basic RPMSG task + */ +void StrEchoTask(void *pvParameters) +{ + PRINTF("RPMSG String Echo Demo...\r\n"); + + app_sema = xSemaphoreCreateCounting(STRING_BUFFER_CNT + 1, 0); + + PRINTF("RPMSG Init as Remote\r\n"); + /* + * RPMSG Init as REMOTE + */ + rpmsg_init(0, &rdev, rpmsg_channel_created, rpmsg_channel_deleted, rpmsg_read_cb, RPMSG_MASTER); + + /* + * rpmsg_channel_created will post the first semaphore + */ + xSemaphoreTake(app_sema, portMAX_DELAY); + PRINTF("Name service handshake is done, M4 has setup a rpmsg channel [%d ---> %d]\r\n", app_chnl->src, app_chnl->dst); + + + /* + * pingpong demo loop + */ + for (;;) { + xSemaphoreTake(app_sema, portMAX_DELAY); + /* + * Take from next app string buffer + */ + if ((strlen(strVar[app_idx]) == 2) && (strVar[app_idx][0] == 0xd) && (strVar[app_idx][1] == 0xa)) + PRINTF("Get New Line From A7 From Slot %d\r\n", app_idx); + else + PRINTF("Get Message From A7 : \"%s\" [len : %d] from slot %d\r\n", strVar[app_idx], strlen(strVar[app_idx]), app_idx); + + /* + * echo back + */ + rpmsg_send(app_chnl, (void*)strVar[app_idx], strlen(strVar[app_idx])); + app_idx = (app_idx + 1) % STRING_BUFFER_CNT; + /* + * once a message is consumed, the MU receive interrupt can be enabled + * again + */ + MU_EnableRxFullInt(MU0_B, MU_RPMSG_CHANNEL); + } +} + +/* + * MU Interrrupt ISR + */ +void BOARD_MU_HANDLER(void) +{ + /* + * calls into rpmsg_handler provided by middleware + */ + rpmsg_handler(); +} + +int main(void) +{ + hardware_init(); + + /* + * Prepare for the MU Interrupt + * MU must be initialized before rpmsg init is called + */ + MU_Init(BOARD_MU_BASE_ADDR); + NVIC_SetPriority(BOARD_MU_IRQ_NUM, APP_MU_IRQ_PRIORITY); + NVIC_EnableIRQ(BOARD_MU_IRQ_NUM); + + // Create a demo task which will print Hello world and echo user's input. + xTaskCreate(StrEchoTask, "String Echo Task", configMINIMAL_STACK_SIZE, + NULL, tskIDLE_PRIORITY+1, NULL); + + // Start FreeRTOS scheduler. + vTaskStartScheduler(); + + // Should never reach this point. + while (true); +} + +/* rpmsg_rx_callback will call into this for a channel creation event*/ +static void rpmsg_channel_created(struct rpmsg_channel *rp_chnl) +{ + /* + * we should give the created rp_chnl handler to app layer + */ + app_chnl = rp_chnl; + + /* + * sync to application layer + */ + xSemaphoreGiveFromISR(app_sema, NULL); +} + +static void rpmsg_channel_deleted(struct rpmsg_channel *rp_chnl) +{ + rpmsg_destroy_ept(rp_chnl->rp_ept); +} + +static void rpmsg_read_cb(struct rpmsg_channel *rp_chnl, void *data, int len, + void * priv, unsigned long src) +{ + /* + * Temperorily Disable MU Receive Interrupt to avoid master + * sending too many messages and remote will fail to keep pace + * to consume + */ + MU_DisableRxFullInt(MU0_B, MU_RPMSG_CHANNEL); + /* + * Copy to next app string buffer + */ + assert(len <= MAX_STRING_SIZE); + memcpy((void*)strVar[handler_idx], data, len); + /* + * Add trailing '\0' + */ + strVar[handler_idx][len] = 0; + handler_idx = (handler_idx + 1) % STRING_BUFFER_CNT; + xSemaphoreGiveFromISR(app_sema, NULL); +} +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/CMakeLists.txt b/examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/CMakeLists.txt new file mode 100644 index 0000000..eff480e --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/CMakeLists.txt @@ -0,0 +1,160 @@ +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}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F) + 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}/../../../../../rtos/FreeRTOS/Source/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F) + 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}/../../../../../rtos/FreeRTOS/Source/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(sema4_demo + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h" + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/MemMang/heap_2.c" + "${ProjDirPath}/../../../FreeRTOSConfig.h" + "${ProjDirPath}/../main.c" + "${ProjDirPath}/../sema4_mutex.c" + "${ProjDirPath}/../sema4_mutex.h" + "${ProjDirPath}/../../../../../platform/drivers/src/sema4.c" + "${ProjDirPath}/../../../../../platform/drivers/inc/sema4.h" + "${ProjDirPath}/../../../../../platform/drivers/src/uart_imx.c" + "${ProjDirPath}/../../../../../platform/drivers/inc/uart_imx.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/croutine.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/event_groups.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/FreeRTOS.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/list.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/mpu_wrappers.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/portable.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/projdefs.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/queue.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/semphr.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/StackMacros.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/task.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/timers.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}/../../../../../rtos/FreeRTOS/Source/croutine.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/event_groups.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/list.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/queue.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/tasks.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/timers.c" + "${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/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/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" +) +SET_TARGET_PROPERTIES(sema4_demo PROPERTIES OUTPUT_NAME "sema4_demo.elf") + +TARGET_LINK_LIBRARIES(sema4_demo -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(sema4_demo m) +TARGET_LINK_LIBRARIES(sema4_demo c) +TARGET_LINK_LIBRARIES(sema4_demo gcc) +TARGET_LINK_LIBRARIES(sema4_demo nosys) +TARGET_LINK_LIBRARIES(sema4_demo -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/sema4_demo.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/sema4_demo.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET sema4_demo POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/sema4_demo.elf ${EXECUTABLE_OUTPUT_PATH}/sema4_demo.hex) +ADD_CUSTOM_COMMAND(TARGET sema4_demo POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/sema4_demo.elf ${EXECUTABLE_OUTPUT_PATH}/sema4_demo.bin) diff --git a/examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_all.bat b/examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_all.bat new file mode 100755 index 0000000..6d41d86 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/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/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_all.sh b/examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_all.sh new file mode 100755 index 0000000..ebb0c25 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/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/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_debug.bat b/examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_debug.bat new file mode 100755 index 0000000..bf3b902 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/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/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_debug.sh b/examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_debug.sh new file mode 100755 index 0000000..571868b --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/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/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_release.bat b/examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_release.bat new file mode 100755 index 0000000..e229a83 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/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/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_release.sh b/examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/build_release.sh new file mode 100755 index 0000000..035ce4e --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/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/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/clean.bat b/examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/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/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/clean.sh b/examples/imx7_colibri_m4/demo_apps/sema4_demo/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/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/imx7_colibri_m4/demo_apps/sema4_demo/ds5/.cproject b/examples/imx7_colibri_m4/demo_apps/sema4_demo/ds5/.cproject new file mode 100644 index 0000000..27bd6d6 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7_colibri_m4/demo_apps/sema4_demo/ds5/.project b/examples/imx7_colibri_m4/demo_apps/sema4_demo/ds5/.project new file mode 100644 index 0000000..4b21d84 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/ds5/.project @@ -0,0 +1,86 @@ + + + sema4_demo_imx7d_sdb_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 + + + freertos2virtual:/virtualfreertos/port.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.cfreertos2virtual:/virtualfreertos/portmacro.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.hstartup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sfreertos2virtual:/virtualfreertos/heap_2.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/portable/MemMang/heap_2.cboard2virtual:/virtualboard/FreeRTOSConfig.h1PARENT-3-PROJECT_LOC/FreeRTOSConfig.hsource2virtual:/virtualsource/main.c1PARENT-1-PROJECT_LOC/main.csource2virtual:/virtualsource/sema4_mutex.c1PARENT-1-PROJECT_LOC/sema4_mutex.csource2virtual:/virtualsource/sema4_mutex.h1PARENT-1-PROJECT_LOC/sema4_mutex.hdriver2virtual:/virtualdriver/sema4.c1PARENT-5-PROJECT_LOC/platform/drivers/src/sema4.cdriver2virtual:/virtualdriver/sema4.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/sema4.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.hfreertos2virtual:/virtualfreertos/croutine.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/croutine.hfreertos2virtual:/virtualfreertos/event_groups.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/event_groups.hfreertos2virtual:/virtualfreertos/FreeRTOS.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/FreeRTOS.hfreertos2virtual:/virtualfreertos/list.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/list.hfreertos2virtual:/virtualfreertos/mpu_wrappers.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/mpu_wrappers.hfreertos2virtual:/virtualfreertos/portable.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/portable.hfreertos2virtual:/virtualfreertos/projdefs.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/projdefs.hfreertos2virtual:/virtualfreertos/queue.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/queue.hfreertos2virtual:/virtualfreertos/semphr.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/semphr.hfreertos2virtual:/virtualfreertos/StackMacros.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/StackMacros.hfreertos2virtual:/virtualfreertos/task.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/task.hfreertos2virtual:/virtualfreertos/timers.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/timers.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.hfreertos2virtual:/virtualfreertos/croutine.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/croutine.cfreertos2virtual:/virtualfreertos/event_groups.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/event_groups.cfreertos2virtual:/virtualfreertos/list.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/list.cfreertos2virtual:/virtualfreertos/queue.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/queue.cfreertos2virtual:/virtualfreertos/tasks.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/tasks.cfreertos2virtual:/virtualfreertos/timers.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/timers.csystem2virtual:/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.cutilities2virtual:/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.hstartup2virtual:/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.c + + + diff --git a/examples/imx7_colibri_m4/demo_apps/sema4_demo/ds5/makedir.bat b/examples/imx7_colibri_m4/demo_apps/sema4_demo/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7_colibri_m4/demo_apps/sema4_demo/ds5/sema4_demo.wsd b/examples/imx7_colibri_m4/demo_apps/sema4_demo/ds5/sema4_demo.wsd new file mode 100644 index 0000000..53c1d2b --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/ds5/sema4_demo.wsd @@ -0,0 +1,9 @@ + + + + sema4_demo_imx7d_sdb_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7_colibri_m4/demo_apps/sema4_demo/hardware_init.c b/examples/imx7_colibri_m4/demo_apps/sema4_demo/hardware_init.c new file mode 100644 index 0000000..0cd686a --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/hardware_init.c @@ -0,0 +1,52 @@ +/* + * 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 SEMA4 access between domains */ + RDC_SetPdapAccess(RDC, BOARD_SEMA4_RDC_PDAP, 0xFF, false, false); + + /* Enable clock used by SEMA4 */ + CCM_ControlGate(CCM, BOARD_SEMA4_CCM_CCGR, ccmClockNeededRunWait); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/sema4_demo/iar/sema4_demo.ewd b/examples/imx7_colibri_m4/demo_apps/sema4_demo/iar/sema4_demo.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/iar/sema4_demo.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/imx7_colibri_m4/demo_apps/sema4_demo/iar/sema4_demo.ewp b/examples/imx7_colibri_m4/demo_apps/sema4_demo/iar/sema4_demo.ewp new file mode 100644 index 0000000..171c428 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/iar/sema4_demo.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 + + + + + + + + +freertos$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/MemMang/heap_2.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/croutine.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/event_groups.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/FreeRTOS.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/list.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/mpu_wrappers.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/portable.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/projdefs.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/queue.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/semphr.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/StackMacros.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/task.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/timers.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/croutine.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/event_groups.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/list.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/queue.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/tasks.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/timers.cstartup$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.hboard$PROJ_DIR$/../../../FreeRTOSConfig.h$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.c$PROJ_DIR$/../sema4_mutex.c$PROJ_DIR$/../sema4_mutex.hdriver$PROJ_DIR$/../../../../../platform/drivers/src/sema4.c$PROJ_DIR$/../../../../../platform/drivers/inc/sema4.h$PROJ_DIR$/../../../../../platform/drivers/src/uart_imx.c$PROJ_DIR$/../../../../../platform/drivers/inc/uart_imx.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.cutilities$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.h diff --git a/examples/imx7_colibri_m4/demo_apps/sema4_demo/iar/sema4_demo.eww b/examples/imx7_colibri_m4/demo_apps/sema4_demo/iar/sema4_demo.eww new file mode 100644 index 0000000..4bebbae --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/iar/sema4_demo.eww @@ -0,0 +1,4 @@ + + +allsema4_demoReleasesema4_demoDebugReleasesema4_demoReleaseDebugsema4_demoDebug +$WS_DIR$/sema4_demo.ewp diff --git a/examples/imx7_colibri_m4/demo_apps/sema4_demo/main.c b/examples/imx7_colibri_m4/demo_apps/sema4_demo/main.c new file mode 100644 index 0000000..ccf070e --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/main.c @@ -0,0 +1,114 @@ +/* + * 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. + */ + +/////////////////////////////////////////////////////////////////////////////// +// Includes +/////////////////////////////////////////////////////////////////////////////// +#include "FreeRTOS.h" +#include "task.h" +#include "board.h" +#include "debug_console_imx.h" +#include "sema4_mutex.h" + +#define SEMA4_DEMO_GATE (3) + +//////////////////////////////////////////////////////////////////////////////// +// Code +//////////////////////////////////////////////////////////////////////////////// +static void Sema4Test() +{ + SEMA4_Mutex_Lock(SEMA4_DEMO_GATE); + PRINTF("\n\r...SEMA4 mutex lock successfully!\n\r"); + SEMA4_Mutex_Unlock(SEMA4_DEMO_GATE); +} + +/*! + * @brief A basic user-defined task + */ +void Sema4Task(void *pvParameters) +{ + uint8_t receiveBuff; + + // Print the initial banner + PRINTF("================== SEMA4 demo ==================\n\r"); + + while(1) + { + // Main routine that triggers a SEMA4 lock + PRINTF("Enter command:\n\r"); + PRINTF("----- 'm' to manually trigger a SEMA4 lock\n\r"); + PRINTF("----- 'a' to automatically trigger SEMA4 lock every 5 seconds\n\r"); + + // First, get character + receiveBuff = GETCHAR(); + // Now echo the received character + PUTCHAR(receiveBuff); + + if (receiveBuff == 'm') + { + Sema4Test(); + } + else if (receiveBuff == 'a') + { + while (true) + { + Sema4Test(); + PRINTF("Wait for 5 seconds......\n\r"); + vTaskDelay(5 * configTICK_RATE_HZ); + } + } + } +} + +/*! + * @brief Main function + */ +int main(void) +{ + // Initialize demo application pins setting and clock setting. + hardware_init(); + + // Initialize SEMA4 mutex gate and reset + SEMA4_Mutex_Init(SEMA4_DEMO_GATE, true); + + // Create a demo task which will print Hello world and echo user's input. + xTaskCreate(Sema4Task, "SEMA4 Task", configMINIMAL_STACK_SIZE, + NULL, tskIDLE_PRIORITY+1, NULL); + + // Start FreeRTOS scheduler. + vTaskStartScheduler(); + + // Should never reach this point. + while (true); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/sema4_demo/sema4_mutex.c b/examples/imx7_colibri_m4/demo_apps/sema4_demo/sema4_mutex.c new file mode 100644 index 0000000..366f481 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/sema4_mutex.c @@ -0,0 +1,145 @@ +/* + * 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. + */ +/**************************************************************************** +* +* Comments: +* This file contains the functions which write and read the SPI memories +* using the ECSPI driver in interrupt mode. +* +****************************************************************************/ + +#include "FreeRTOS.h" +#include "semphr.h" +#include "task.h" +#include "board.h" +#include "sema4_mutex.h" +#include "sema4.h" +#include "debug_console_imx.h" + +static SemaphoreHandle_t xSemaphore[16]; +static uint32_t recursiveDepth[16]; +static bool nvicInit; + +void SEMA4_Mutex_Init(uint32_t gate, bool reset) +{ + assert(gate < 16); + assert(!xSemaphore[gate]); + + /* We use counting semaphore because the sequence of take/give could not + * be guarenteed. */ + xSemaphore[gate] = xSemaphoreCreateCounting(1, 0); + + /* Reset the gate when required */ + if (reset) + { + SEMA4_ResetGate(BOARD_SEMA4_BASEADDR, gate); + SEMA4_ResetNotification(BOARD_SEMA4_BASEADDR, gate); + } + + /* NVIC initialize */ + if (!nvicInit) + { + NVIC_SetPriority(BOARD_SEMA4_IRQ_NUM, 3); + NVIC_EnableIRQ(BOARD_SEMA4_IRQ_NUM); + nvicInit = true; + } +} + +void SEMA4_Mutex_Lock(uint32_t gate) +{ + bool locked = false; + + assert(gate < 16); + + /* If already locked by this processor, just add recursive depth */ + if (SEMA4_GetLockProcessor(BOARD_SEMA4_BASEADDR, gate) == SEMA4_PROCESSOR_SELF) + { + recursiveDepth[gate]++; + return; + } + + while (true) + { + /* Critical section with ISR */ + taskDISABLE_INTERRUPTS(); + + /* Enable unlock interrupt of this gate */ + SEMA4_SetIntCmd(BOARD_SEMA4_BASEADDR, SEMA4_GATE_STATUS_FLAG(gate), true); + if (SEMA4_TryLock(BOARD_SEMA4_BASEADDR, gate) == statusSema4Success) + { + recursiveDepth[gate]++; + /* Got the SEMA4, unlock interrupt is not needed any more */ + SEMA4_SetIntCmd(BOARD_SEMA4_BASEADDR, SEMA4_GATE_STATUS_FLAG(gate), false); + locked = true; + } + + taskENABLE_INTERRUPTS(); + + if (locked) + break; + else + { + PRINTF("\n\r...Lock pending, waiting for the other core unlock the gate\n\r"); + /* Wait for unlock interrupt */ + xSemaphoreTake(xSemaphore[gate], portMAX_DELAY); + /* Got the unlock event, indicating the interrupt was disabled in ISR */ + } + } +} + +void SEMA4_Mutex_Unlock(uint32_t gate) +{ + if ((--recursiveDepth[gate]) == 0) + SEMA4_Unlock(BOARD_SEMA4_BASEADDR, gate); +} + +void BOARD_SEMA4_HANDLER() +{ + BaseType_t xHigherPriorityTaskWoken; + uint32_t i; + uint16_t flag; + + for (i = 0; i < 16; i++) + { + flag = SEMA4_GATE_STATUS_FLAG(i); + if (xSemaphore[i] && SEMA4_GetIntEnabled(BOARD_SEMA4_BASEADDR, flag) && + SEMA4_GetStatusFlag(BOARD_SEMA4_BASEADDR, flag)) + { + /* Because the status cannot be cleared manually, we have to disable the gate's + * interrupt to avoid endlessly going into ISR */ + SEMA4_SetIntCmd(BOARD_SEMA4_BASEADDR, flag, false); + xSemaphoreGiveFromISR(xSemaphore[i], &xHigherPriorityTaskWoken); + } + } +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/sema4_demo/sema4_mutex.h b/examples/imx7_colibri_m4/demo_apps/sema4_demo/sema4_mutex.h new file mode 100644 index 0000000..b380111 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sema4_demo/sema4_mutex.h @@ -0,0 +1,63 @@ +/* + * 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. + */ + +#ifndef __SEMA4_MUTEX_H__ +#define __SEMA4_MUTEX_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Initialize SEMA4 mutex with specific gate. + */ +void SEMA4_Mutex_Init(uint32_t gate, bool reset); + +/*! + * @brief Lock the SEMA4 gate, blocking when obtained by the other core + */ +void SEMA4_Mutex_Lock(uint32_t gate); + +/*! + * @brief Unlock the SEMA4 gate + */ +void SEMA4_Mutex_Unlock(uint32_t gate); + +#ifdef __cplusplus +} +#endif + +#endif /* __SEMA4_MUTEX_H__ */ +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/CMakeLists.txt b/examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/CMakeLists.txt new file mode 100644 index 0000000..c2ab91e --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/CMakeLists.txt @@ -0,0 +1,170 @@ +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}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F) + 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}/../../../../../rtos/FreeRTOS/Source/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../common) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F) + 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}/../../../../../rtos/FreeRTOS/Source/include) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../../../../platform/utilities/inc) + INCLUDE_DIRECTORIES(${ProjDirPath}/../../..) + INCLUDE_DIRECTORIES(${ProjDirPath}/../common) +ENDIF() + +# ADD_EXECUTABLE +ADD_EXECUTABLE(sensor_demo + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h" + "${ProjDirPath}/../../../../../platform/devices/MCIMX7D/startup/gcc/startup_MCIMX7D_M4.S" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/portable/MemMang/heap_2.c" + "${ProjDirPath}/../../../FreeRTOSConfig.h" + "${ProjDirPath}/../sensor_demo_imx7d/main.c" + "${ProjDirPath}/../common/i2c_xfer.c" + "${ProjDirPath}/../common/i2c_xfer.h" + "${ProjDirPath}/../common/mpl3115.c" + "${ProjDirPath}/../common/mpl3115.h" + "${ProjDirPath}/../common/fxos8700.c" + "${ProjDirPath}/../common/fxos8700.h" + "${ProjDirPath}/../common/fxas21002.c" + "${ProjDirPath}/../common/fxas21002.h" + "${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" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/croutine.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/event_groups.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/FreeRTOS.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/list.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/mpu_wrappers.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/portable.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/projdefs.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/queue.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/semphr.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/StackMacros.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/task.h" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/include/timers.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}/../../../../../rtos/FreeRTOS/Source/croutine.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/event_groups.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/list.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/queue.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/tasks.c" + "${ProjDirPath}/../../../../../rtos/FreeRTOS/Source/timers.c" + "${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/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/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" +) +SET_TARGET_PROPERTIES(sensor_demo PROPERTIES OUTPUT_NAME "sensor_demo.elf") + +TARGET_LINK_LIBRARIES(sensor_demo -Wl,--start-group) +# LIBRARIES +IF(CMAKE_BUILD_TYPE MATCHES Debug) +ELSEIF(CMAKE_BUILD_TYPE MATCHES Release) +ENDIF() + +# SYSTEM LIBRARIES +TARGET_LINK_LIBRARIES(sensor_demo m) +TARGET_LINK_LIBRARIES(sensor_demo c) +TARGET_LINK_LIBRARIES(sensor_demo gcc) +TARGET_LINK_LIBRARIES(sensor_demo nosys) +TARGET_LINK_LIBRARIES(sensor_demo -Wl,--end-group) + +# MAP FILE +SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Xlinker -Map=debug/sensor_demo.map") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -Xlinker -Map=release/sensor_demo.map") + +# BIN AND HEX +ADD_CUSTOM_COMMAND(TARGET sensor_demo POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Oihex ${EXECUTABLE_OUTPUT_PATH}/sensor_demo.elf ${EXECUTABLE_OUTPUT_PATH}/sensor_demo.hex) +ADD_CUSTOM_COMMAND(TARGET sensor_demo POST_BUILD COMMAND ${CMAKE_OBJCOPY} -Obinary ${EXECUTABLE_OUTPUT_PATH}/sensor_demo.elf ${EXECUTABLE_OUTPUT_PATH}/sensor_demo.bin) diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_all.bat b/examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_all.bat new file mode 100755 index 0000000..6d41d86 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/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/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_all.sh b/examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_all.sh new file mode 100755 index 0000000..ebb0c25 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/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/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_debug.bat b/examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_debug.bat new file mode 100755 index 0000000..bf3b902 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/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/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_debug.sh b/examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_debug.sh new file mode 100755 index 0000000..571868b --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/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/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_release.bat b/examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_release.bat new file mode 100755 index 0000000..e229a83 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/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/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_release.sh b/examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/build_release.sh new file mode 100755 index 0000000..035ce4e --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/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/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/clean.bat b/examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/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/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/clean.sh b/examples/imx7_colibri_m4/demo_apps/sensor_demo/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/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/imx7_colibri_m4/demo_apps/sensor_demo/common/fxas21002.c b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/fxas21002.c new file mode 100644 index 0000000..4764390 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/fxas21002.c @@ -0,0 +1,118 @@ +/* + * 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 "i2c_xfer.h" +#include "fxas21002.h" + +/*FUNCTION**************************************************************** +* +* Function Name : fxas21002_init +* Returned Value : result +* Comments : Initialize FXAS21002 Gyro sensor. +* +*END*********************************************************************/ +bool fxas21002_init(gyro_sensor_t* pThisGyro) +{ + uint8_t txBuffer; + uint8_t cmdBuffer[2]; + + pThisGyro->fDegPerSecPerCount = FXAS21002_DEGPERSECPERCOUNT; + + // Write 0000 0000 = 0x00 to CTRL_REG1 to place FXOS21002 in Standby + // [7]: ZR_cond=0 + // [6]: RST=0 + // [5]: ST=0 self test disabled + // [4-2]: DR[2-0]=000 for 800Hz + // [1-0]: Active=0, Ready=0 for Standby mode + cmdBuffer[0] = BOARD_I2C_FXAS21002_ADDR << 1; + cmdBuffer[1] = FXAS21002_CTRL_REG1; + txBuffer = 0x00; + if (!I2C_XFER_SendDataBlocking(cmdBuffer, 2, &txBuffer, 1)) + return false; + + // write 0000 0000 = 0x00 to CTRL_REG0 to configure range and filters + // [7-6]: BW[1-0]=00, LPF disabled + // [5]: SPIW=0 4 wire SPI (irrelevant) + // [4-3]: SEL[1-0]=00 for 10Hz HPF at 200Hz ODR + // [2]: HPF_EN=0 disable HPF + // [1-0]: FS[1-0]=00 for 1600dps (TBD CHANGE TO 2000dps when final trimmed parts available) + cmdBuffer[0] = BOARD_I2C_FXAS21002_ADDR << 1; + cmdBuffer[1] = FXAS21002_CTRL_REG0; + txBuffer = 0x00; + if (!I2C_XFER_SendDataBlocking(cmdBuffer, 2, &txBuffer, 1)) + return false; + + // write 0000 0010 = 0x02 to CTRL_REG1 to configure 800Hz ODR and enter Active mode + // [7]: ZR_cond=0 + // [6]: RST=0 + // [5]: ST=0 self test disabled + // [4-2]: DR[2-0]=000 for 800Hz ODR + // [1-0]: Active=1, Ready=0 for Active mode + cmdBuffer[0] = BOARD_I2C_FXAS21002_ADDR << 1; + cmdBuffer[1] = FXAS21002_CTRL_REG1; + txBuffer = 0x02; + if (!I2C_XFER_SendDataBlocking(cmdBuffer, 2, &txBuffer, 1)) + return false; + + return true; +} + +/*FUNCTION**************************************************************** +* +* Function Name : fxas21002_read_data +* Returned Value : result +* Comments : Get current height and temperature from fxas21002. +* +*END*********************************************************************/ +bool fxas21002_read_data(gyro_sensor_t* pThisGyro) +{ + uint8_t rxBuffer[6]; + uint8_t cmdBuffer[3]; + + // store the gain terms in the GyroSensor structure + cmdBuffer[0] = BOARD_I2C_FXAS21002_ADDR << 1; + cmdBuffer[1] = FXAS21002_OUT_X_MSB; + cmdBuffer[2] = (BOARD_I2C_FXAS21002_ADDR << 1) + 1; + if (!I2C_XFER_ReceiveDataBlocking(cmdBuffer, 3, rxBuffer, 6)) + return false; + + pThisGyro->iYpFast[0] = (rxBuffer[0] << 8) | rxBuffer[1]; + pThisGyro->iYpFast[1] = (rxBuffer[2] << 8) | rxBuffer[3]; + pThisGyro->iYpFast[2] = (rxBuffer[4] << 8) | rxBuffer[5]; + + return true; +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/fxas21002.h b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/fxas21002.h new file mode 100644 index 0000000..a3adbae --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/fxas21002.h @@ -0,0 +1,98 @@ +/* + * 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. + */ + +#ifndef __FXAS21002_H__ +#define __FXAS21002_H__ + +#define OVERSAMPLE_RATIO (64) // int32: 8x: 3DOF, 6DOF, 9DOF run at SENSORFS / OVERSAMPLE_RATIO Hz + +// place the gain in the gyro structure +#define FXAS21002_COUNTSPERDEGPERSEC (16.0F) // for production 2000dps range (2000dps=32000) +#define FXAS21002_DEGPERSECPERCOUNT (0.0625F) // must be reciprocal of FCOUNTSPERDEGPERSEC + +/* I2C Slave Address define */ +#define FXAS21002_ADDRESS_0 (0x20) +#define FXAS21002_ADDRESS_1 (0x21) +#define FXAS21002_ADDRESS_DEFAULT (FXAS21002_ADDRESS_0) + +/* FXAS21002 device ID number */ +#define FXAS21002_DEVICE_ID (0xD7) + +/* FXAS21002 Registers address definition */ +#define FXAS21002_STATUS (0x00) +#define FXAS21002_OUT_X_MSB (0x01) +#define FXAS21002_OUT_X_LSB (0x02) +#define FXAS21002_OUT_Y_MSB (0x03) +#define FXAS21002_OUT_Y_LSB (0x04) +#define FXAS21002_OUT_Z_MSB (0x05) +#define FXAS21002_OUT_Z_LSB (0x06) +#define FXAS21002_DR_STATUS (0x07) +#define FXAS21002_F_STATUS (0x08) +#define FXAS21002_F_SETUP (0x09) +#define FXAS21002_F_EVENT (0x0A) +#define FXAS21002_INT_SRC_FLAG (0x0B) +#define FXAS21002_WHO_AM_I (0x0C) +#define FXAS21002_CTRL_REG0 (0x0D) +#define FXAS21002_RT_CFG (0x0E) +#define FXAS21002_RT_SRC (0x0F) +#define FXAS21002_RT_THS (0x10) +#define FXAS21002_RT_COUNT (0x11) +#define FXAS21002_TEMP (0x12) +#define FXAS21002_CTRL_REG1 (0x13) +#define FXAS21002_CTRL_REG2 (0x14) +#define FXAS21002_CTRL_REG3 (0x15) + +// gyro sensor structure definition +typedef struct _gyro_sensor +{ + int32_t iSumYpFast[3]; // sum of fast measurements + float fYp[3]; // raw gyro sensor output (deg/s) + float fDegPerSecPerCount; // initialized to FDEGPERSECPERCOUNT + int16_t iYpFast[3]; // fast (typically 200Hz) readings + int16_t iYp[3]; // averaged gyro sensor output (counts) +} gyro_sensor_t; + +/* Function prototypes */ +#if defined(__cplusplus) +extern "C" { +#endif + +bool fxas21002_init(gyro_sensor_t*); +bool fxas21002_read_data(gyro_sensor_t*); + +#ifdef __cplusplus +} +#endif + + +#endif /* __FXAS21002_H__ */ +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/fxos8700.c b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/fxos8700.c new file mode 100644 index 0000000..207c594 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/fxos8700.c @@ -0,0 +1,158 @@ +/* + * 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 "i2c_xfer.h" +#include "fxos8700.h" + +/*FUNCTION**************************************************************** +* +* Function Name : fxos8700_init +* Returned Value : result +* Comments : Initialize FXOS8700 Acc and Mag sensor. +* +*END*********************************************************************/ +bool fxos8700_init(void) +{ + uint8_t txBuffer; + uint8_t cmdBuffer[2]; + + // write 0000 0000 = 0x00 to CTRL_REG1 to place FXOS8700 into standby + // [7-1] = 0000 000 + // [0]: active=0 + cmdBuffer[0] = BOARD_I2C_FXOS8700_ADDR << 1; + cmdBuffer[1] = FXOS8700_CTRL_REG1; + txBuffer = 0x00; + if (!I2C_XFER_SendDataBlocking(cmdBuffer, 2, &txBuffer, 1)) + return false; + + // write 0001 1111 = 0x1F to M_CTRL_REG1 + // [7]: m_acal=0: auto calibration disabled + // [6]: m_rst=0: one-shot magnetic reset disabled + // [5]: m_ost=0: one-shot magnetic measurement disabled + // [4-2]: m_os=111=7: 8x oversampling (for 200Hz) to reduce magnetometer noise + // [1-0]: m_hms=11=3: select hybrid mode with accel and magnetometer active + cmdBuffer[0] = BOARD_I2C_FXOS8700_ADDR << 1; + cmdBuffer[1] = FXOS8700_M_CTRL_REG1; + txBuffer = 0x1F; + if (!I2C_XFER_SendDataBlocking(cmdBuffer, 2, &txBuffer, 1)) + return false; + + // write 0010 0000 = 0x20 to magnetometer control register 2 + // [7]: reserved + // [6]: reserved + // [5]: hyb_autoinc_mode=1 to map the magnetometer registers to follow the accelerometer registers + // [4]: m_maxmin_dis=0 to retain default min/max latching even though not used + // [3]: m_maxmin_dis_ths=0 + // [2]: m_maxmin_rst=0 + // [1-0]: m_rst_cnt=00 to enable magnetic reset each cycle + cmdBuffer[0] = BOARD_I2C_FXOS8700_ADDR << 1; + cmdBuffer[1] = FXOS8700_M_CTRL_REG2; + txBuffer = 0x20; + if (!I2C_XFER_SendDataBlocking(cmdBuffer, 2, &txBuffer, 1)) + return false; + + // write 0000 0001= 0x01 to XYZ_DATA_CFG register + // [7]: reserved + // [6]: reserved + // [5]: reserved + // [4]: hpf_out=0 + // [3]: reserved + // [2]: reserved + // [1-0]: fs=01 for 4g mode: 2048 counts / g = 8192 counts / g after 2 bit left shift + cmdBuffer[0] = BOARD_I2C_FXOS8700_ADDR << 1; + cmdBuffer[1] = FXOS8700_XYZ_DATA_CFG; + txBuffer = 0x01; + if (!I2C_XFER_SendDataBlocking(cmdBuffer, 2, &txBuffer, 1)) + return false; + + // write 0000 0010 = 0x02 to CTRL_REG2 to set MODS bits + // [7]: st=0: self test disabled + // [6]: rst=0: reset disabled + // [5]: unused + // [4-3]: smods=00 + // [2]: slpe=0: auto sleep disabled + // [1-0]: mods=10 for high resolution (maximum over sampling) + cmdBuffer[0] = BOARD_I2C_FXOS8700_ADDR << 1; + cmdBuffer[1] = FXOS8700_CTRL_REG2; + txBuffer = 0x02; + if (!I2C_XFER_SendDataBlocking(cmdBuffer, 2, &txBuffer, 1)) + return false; + + // write 0000 1101 = 0x0D to accelerometer control register 1 + // [7-6]: aslp_rate=00 + // [5-3]: dr=001=1 for 200Hz data rate (when in hybrid mode) + // [2]: lnoise=1 for low noise mode (since we're in 4g mode) + // [1]: f_read=0 for normal 16 bit reads + // [0]: active=1 to take the part out of standby and enable sampling + cmdBuffer[0] = BOARD_I2C_FXOS8700_ADDR << 1; + cmdBuffer[1] = FXOS8700_CTRL_REG1; + txBuffer = 0x0D; + if (!I2C_XFER_SendDataBlocking(cmdBuffer, 2, &txBuffer, 1)) + return false; + + return true; +} + +/*FUNCTION**************************************************************** +* +* Function Name : fxos8700_read_data +* Returned Value : result +* Comments : Get current Acc and Mag from FXOS8700 6-axis sensor. +* +*END*********************************************************************/ +bool fxos8700_read_data(int16_t *Ax, int16_t *Ay, int16_t *Az, + int16_t *Mx, int16_t *My, int16_t *Mz) +{ + uint8_t rxBuffer[12]; + uint8_t cmdBuffer[3]; + + // Fetch Current Acc and Mag in all Axis + cmdBuffer[0] = BOARD_I2C_FXOS8700_ADDR << 1; + cmdBuffer[1] = FXOS8700_OUT_X_MSB; + cmdBuffer[2] = (BOARD_I2C_FXOS8700_ADDR << 1) + 1; + if (!I2C_XFER_ReceiveDataBlocking(cmdBuffer, 3, rxBuffer, 12)) + return false; + + *Ax = (rxBuffer[2] << 8) | rxBuffer[3]; + *Ay = (rxBuffer[0] << 8) | rxBuffer[1]; + *Az = (rxBuffer[4] << 8) | rxBuffer[5]; + *Mx = (rxBuffer[8] << 8) | rxBuffer[9]; + *My = (rxBuffer[6] << 8) | rxBuffer[7]; + *Mz = (rxBuffer[10] << 8) | rxBuffer[11]; + + return true; +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/fxos8700.h b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/fxos8700.h new file mode 100644 index 0000000..65e61cd --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/fxos8700.h @@ -0,0 +1,72 @@ +/* + * 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. + */ + +#ifndef __FXOS8700_H__ +#define __FXOS8700_H__ + +#include +#include + +/* I2C Slave Address define */ +#define FXOS8700_ADDRESS_0 (0x1C) +#define FXOS8700_ADDRESS_1 (0x1D) +#define FXOS8700_ADDRESS_2 (0x1E) +#define FXOS8700_ADDRESS_3 (0x1F) +#define FXOS8700_ADDRESS_DEFAULT (FXOS8700_ADDRESS_0) + +/* FXOS8700 device ID number */ +#define FXOS8700_DEVICE_ID (0xC7) + +/* FXOS8700 Registers address definition */ +#define FXOS8700_OUT_X_MSB (0x01) +#define FXOS8700_WHO_AM_I (0x0D) +#define FXOS8700_XYZ_DATA_CFG (0x0E) +#define FXOS8700_CTRL_REG1 (0x2A) +#define FXOS8700_CTRL_REG2 (0x2B) +#define FXOS8700_M_CTRL_REG1 (0x5B) +#define FXOS8700_M_CTRL_REG2 (0x5C) + +/* Function prototypes */ +#if defined(__cplusplus) +extern "C" { +#endif + +bool fxos8700_init(void); +bool fxos8700_read_data(int16_t *, int16_t *, int16_t *, int16_t *, int16_t *, int16_t *); + +#ifdef __cplusplus +} +#endif + + +#endif/* __FXOS8700_H__ */ +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/i2c_xfer.c b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/i2c_xfer.c new file mode 100644 index 0000000..b8410d4 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/i2c_xfer.c @@ -0,0 +1,326 @@ +/* + * 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 "FreeRTOS.h" +#include "semphr.h" +#include "device_imx.h" +#include "i2c_imx.h" +#include "board.h" + +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. */ + uint32_t cmdSize; /*!< The remaining number of commands to be transmitted. */ + uint32_t txSize; /*!< The remaining number of bytes to be transmitted. */ + uint32_t rxSize; /*!< The remaining number of bytes to be received. */ + bool isBusy; /*!< True if there is an active transmission. */ + uint32_t operateDir; /*!< Overall I2C bus operating direction. */ + uint32_t currentDir; /*!< Current Data transfer direction. */ + uint32_t currentMode; /*!< Current I2C Bus role of this module. */ + SemaphoreHandle_t xSemaphore; /*!< I2C internal synchronize semaphore. */ +} i2c_state_t; + +/* I2C runtime state structure */ +static volatile i2c_state_t i2cState; + +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; + i2cState.xSemaphore = xSemaphoreCreateBinary(); + + /* 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); +} + +bool I2C_XFER_SendDataBlocking(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); + + /* Wait until send data finish. */ + xSemaphoreTake(i2cState.xSemaphore, portMAX_DELAY); + + return true; +} + +uint32_t I2C_XFER_GetSendStatus(void) +{ + return i2cState.txSize; +} + +bool I2C_XFER_ReceiveDataBlocking(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); + + /* Wait until receive data finish. */ + xSemaphoreTake(i2cState.xSemaphore, portMAX_DELAY); + + return true; +} + +uint32_t I2C_XFER_GetReceiveStatus(void) +{ + return i2cState.rxSize; +} + +void BOARD_I2C_HANDLER(void) +{ + BaseType_t xHigherPriorityTaskWoken = pdFALSE; + + /* 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; + xSemaphoreGiveFromISR(i2cState.xSemaphore, &xHigherPriorityTaskWoken); + } + 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; + /* Release I2C Sem4 */ + xSemaphoreGiveFromISR(i2cState.xSemaphore, &xHigherPriorityTaskWoken); + } + } + } +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/i2c_xfer.h b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/i2c_xfer.h new file mode 100644 index 0000000..64b8f03 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/i2c_xfer.h @@ -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. + */ +#ifndef __I2C_XFER_H__ +#define __I2C_XFER_H__ + +#include +#include +#include "i2c_imx.h" + +/* Function prototypes */ +#if defined(__cplusplus) +extern "C" { +#endif + +void I2C_XFER_Config(i2c_init_config_t* initConfig); +bool I2C_XFER_SendDataBlocking(const uint8_t* cmdBuff, uint32_t cmdSize, const uint8_t* txBuffer, uint32_t txSize); +uint32_t I2C_XFER_GetSendStatus(void); +bool I2C_XFER_ReceiveDataBlocking(const uint8_t* cmdBuff, uint32_t cmdSize, uint8_t* rxBuffer, uint32_t rxSize); +uint32_t I2C_XFER_GetReceiveStatus(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __I2C_XFER_H__ */ +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/mma8451q.c b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/mma8451q.c new file mode 100644 index 0000000..d44f63d --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/mma8451q.c @@ -0,0 +1,185 @@ +/* + * 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_xfer.h" +#include "mma8451q.h" + +static uint8_t mma8451qMode; + +/*FUNCTION**************************************************************** +* +* Function Name : MMA8451Q_Init +* Returned Value : true or false +* Comments : Initialize MMA8451Q 3-axis accelerometer sensor. +* +*END*********************************************************************/ +bool MMA8451Q_Init(void) +{ + uint8_t txBuffer; + uint8_t rxBuffer; + uint8_t cmdBuffer[3]; + + /* Place the MMA8451Q in Standby */ + PRINTF("Place the MMA8451Q in standby mode... "); + cmdBuffer[0] = BOARD_I2C_MMA8451Q_ADDR << 1; + cmdBuffer[1] = MMA8451Q_CTRL_REG1; + txBuffer = 0x00; + if (!I2C_XFER_SendDataBlocking(cmdBuffer, 2, &txBuffer, 1)) + { + PRINTF("ERROR\n\r"); + return false; + } + PRINTF("OK\n\r"); + + // write 0000 0000= 0x00 to MMA8451Q_XYZ_DATA_CFG register + // [7]: reserved + // [6]: reserved + // [5]: reserved + // [4]: hpf_out=0 + // [3]: reserved + // [2]: reserved + // [1-0]: fs=00 for 2g mode. + PRINTF("Set the mode: 2G ... "); + cmdBuffer[0] = BOARD_I2C_MMA8451Q_ADDR << 1; + cmdBuffer[1] = MMA8451Q_XYZ_DATA_CFG; + txBuffer = 0x00; + if (!I2C_XFER_SendDataBlocking(cmdBuffer, 2, &txBuffer, 1)) + { + PRINTF("ERROR\n\r"); + return false; + } + mma8451qMode = 0U; + PRINTF("OK\n\r"); + + // write 0000 0001 = 0x01 to MMA8451Q_CTRL_REG1 + // [7-6]: aslp_rate=00 + // [5-3]: dr=000 + // [2]: lnoise=0 + // [1]: f_read=0 for normal read mode + // [0]: active=1 to take the part out of standby and enable sampling + PRINTF("Fast read clear and active mode ... "); + cmdBuffer[0] = BOARD_I2C_MMA8451Q_ADDR << 1; + cmdBuffer[1] = MMA8451Q_CTRL_REG1; + txBuffer = 0x01; + if (!I2C_XFER_SendDataBlocking(cmdBuffer, 2, &txBuffer, 1)) + { + PRINTF("ERROR\n\r"); + return false; + } + PRINTF("OK\n\r"); + + // read WHO_AM_I device register, 0x1A + PRINTF("Test WHO_AM_I check... "); + cmdBuffer[0] = BOARD_I2C_MMA8451Q_ADDR << 1; + cmdBuffer[1] = MMA8451Q_WHO_AM_I; + cmdBuffer[2] = (BOARD_I2C_MMA8451Q_ADDR << 1) + 1; + if (!I2C_XFER_ReceiveDataBlocking(cmdBuffer, 3, &rxBuffer, 1)) + { + PRINTF("ERROR\n\r"); + return false; + } + if(rxBuffer == MMA8451Q_DEVICE_ID) + PRINTF("OK\n\r"); + else + { + PRINTF("ERROR\n\r"); + return false; + } + return true; +} + +/*FUNCTION**************************************************************** +* +* Function Name : MMA8451Q_ReadData +* Returned Value : true or false +* Comments : Get current acceleration from MMA8451Q. +* +*END*********************************************************************/ +bool MMA8451Q_ReadData(int16_t *x, int16_t *y, int16_t *z) +{ + uint8_t rxBuffer[7]; + uint8_t cmdBuffer[3]; + + cmdBuffer[0] = BOARD_I2C_MMA8451Q_ADDR << 1; + cmdBuffer[1] = MMA8451Q_OUT_X_MSB; + cmdBuffer[2] = (BOARD_I2C_MMA8451Q_ADDR << 1) + 1; + if (!I2C_XFER_ReceiveDataBlocking(cmdBuffer, 3, rxBuffer, 7)) + return false; + + *x = ((rxBuffer[0] << 8) & 0xff00) | rxBuffer[1]; + *y = ((rxBuffer[2] << 8) & 0xff00) | rxBuffer[3]; + *z = ((rxBuffer[4] << 8) & 0xff00) | rxBuffer[5]; + *x = (int16_t)(*x) >> 2; + *y = (int16_t)(*y) >> 2; + *z = (int16_t)(*z) >> 2; + + if(mma8451qMode == mma8451qMode_4G) + { + (*x) = (*x) << 1; + (*y) = (*y) << 1; + (*z) = (*z) << 1; + } + else if(mma8451qMode == mma8451qMode_8G) + { + (*x) = (*x) << 2; + (*y) = (*y) << 2; + (*z) = (*z) << 2; + } + + return true; +} + + /*FUNCTION**************************************************************** +* +* Function Name : MMA8451Q_ChangeMode +* Returned Value : true or false +* Comments : Change the current mode. +* +*END*********************************************************************/ +bool MMA8451Q_ChangeMode(uint8_t mode) +{ + uint8_t txBuffer; + uint8_t cmdBuffer[2]; + + cmdBuffer[0] = BOARD_I2C_MMA8451Q_ADDR << 1; + cmdBuffer[1] = MMA8451Q_XYZ_DATA_CFG; + txBuffer = mode; + if (!I2C_XFER_SendDataBlocking(cmdBuffer, 2, &txBuffer, 1)) + return false; + return true; +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/mma8451q.h b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/mma8451q.h new file mode 100644 index 0000000..b371bbd --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/mma8451q.h @@ -0,0 +1,113 @@ +/* + * 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. + */ + +#ifndef __MMA8451Q_H__ +#define __MMA8451Q_H__ + +#include +#include + +/* I2C Slave Address define */ +#define MMA8451Q_ADDRESS_0 (0x1C) /* SA0 = 0, low logic */ +#define MMA8451Q_ADDRESS_1 (0x1D) /* SA0 = 1, high logic */ + +/* MMA8451Q device ID number */ +#define MMA8451Q_DEVICE_ID (0x1A) + +/* MMA8451Q Registers address definition */ +#define MMA8451Q_STATUS (0x00) +#define MMA8451Q_OUT_X_MSB (0x01) +#define MMA8451Q_OUT_X_LSB (0x02) +#define MMA8451Q_OUT_Y_MSB (0x03) +#define MMA8451Q_OUT_Y_LSB (0x04) +#define MMA8451Q_OUT_Z_MSB (0x05) +#define MMA8451Q_OUT_Z_LSB (0x06) +#define MMA8451Q_F_SETUP (0x09) +#define MMA8451Q_TRIG_CFG (0x0A) +#define MMA8451Q_SYSMOD (0x0B) +#define MMA8451Q_INT_SOURCE (0x0C) +#define MMA8451Q_WHO_AM_I (0x0D) +#define MMA8451Q_XYZ_DATA_CFG (0x0E) +#define MMA8451Q_HP_FILTER_CUTOFF (0x0F) +#define MMA8451Q_PL_STATUS (0x10) +#define MMA8451Q_PL_CFG (0x11) +#define MMA8451Q_PL_COUNT (0x12) +#define MMA8451Q_PL_BF_ZCOMP (0x13) +#define MMA8451Q_PL_THS_REG (0x14) +#define MMA8451Q_FF_MT_CFG (0x15) +#define MMA8451Q_FF_MT_SRC (0x16) +#define MMA8451Q_FF_MT_THS (0x17) +#define MMA8451Q_FF_MT_COUNT (0x18) +#define MMA8451Q_TRANSIENT_CFG (0x1D) +#define MMA8451Q_TRANSIENT_SRC (0x1E) +#define MMA8451Q_TRANSIENT_THS (0x1F) +#define MMA8451Q_TRANSIENT_COUNT (0x20) +#define MMA8451Q_PULSE_CFG (0x21) +#define MMA8451Q_PULSE_SRC (0x22) +#define MMA8451Q_PULSE_THSX (0x23) +#define MMA8451Q_PULSE_THSY (0x24) +#define MMA8451Q_PULSE_THSZ (0x25) +#define MMA8451Q_PULSE_TMLT (0x26) +#define MMA8451Q_PULSE_LTCY (0x27) +#define MMA8451Q_PULSE_WIND (0x28) +#define MMA8451Q_ASLP_COUNT (0x29) +#define MMA8451Q_CTRL_REG1 (0x2A) +#define MMA8451Q_CTRL_REG2 (0x2B) +#define MMA8451Q_CTRL_REG3 (0x2C) +#define MMA8451Q_CTRL_REG4 (0x2D) +#define MMA8451Q_CTRL_REG5 (0x2E) +#define MMA8451Q_OFF_X (0x2F) +#define MMA8451Q_OFF_Y (0x30) +#define MMA8451Q_OFF_Z (0x31) + +enum _mma8451q_mode +{ + mma8451qMode_2G = 0U, + mma8451qMode_4G = 1U, + mma8451qMode_8G = 2U +}; + +/* Function prototypes */ +#if defined(__cplusplus) +extern "C" { +#endif + +bool MMA8451Q_Init(void); +bool MMA8451Q_ReadData(int16_t *x, int16_t *y, int16_t *z); +bool MMA8451Q_ChangeMode(uint8_t mode); + +#ifdef __cplusplus +} +#endif + +#endif /* __MMA8451Q_H__ */ +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/mpl3115.c b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/mpl3115.c new file mode 100644 index 0000000..f5dcddb --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/mpl3115.c @@ -0,0 +1,112 @@ +/* + * 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 "i2c_xfer.h" +#include "mpl3115.h" + +#define MPL3115_MPERCOUNT 0.0000152587890625F // 1/65536 fixed range for MPL3115 +#define MPL3115_CPERCPOUNT 0.00390625F // 1/256 fixed range for MPL3115 + +/*FUNCTION**************************************************************** +* +* Function Name : mpl3115_init +* Returned Value : result +* Comments : Initialize MPL3115 pressure and temperature sensor. +* +*END*********************************************************************/ +bool mpl3115_init(pressure_sensor_t* pThisPressure) +{ + uint8_t txBuffer; + uint8_t cmdBuffer[2]; + + pThisPressure->fmPerCount = MPL3115_MPERCOUNT; + pThisPressure->fCPerCount = MPL3115_CPERCPOUNT; + + /* Place the MPL3115 in Standby */ + cmdBuffer[0] = MPL3115_ADDRESS << 1; + cmdBuffer[1] = MPL3115_CTRL_REG1; + txBuffer = 0x00; + if (!I2C_XFER_SendDataBlocking(cmdBuffer, 2, &txBuffer, 1)) + return false; + + /* Enable Data Flags in PT_DATA_CFG */ + cmdBuffer[0] = MPL3115_ADDRESS << 1; + cmdBuffer[1] = MPL3115_PT_DATA_CFG; + txBuffer = 0x07; + if (!I2C_XFER_SendDataBlocking(cmdBuffer, 2, &txBuffer, 1)) + return false; + + // write 1011 1001 = 0xB9 to configure MPL3115 and enter Active mode + // [7]: ALT=1 for altitude measurements + // [6]: RAW=0 to disable raw measurements + // [5-3]: OS=111 for OS ratio=128 for maximum internal averaging with 512ms output interval + // [2]: RST=0 do not enter reset + // [1]: OST=0 do not initiate a reading + // [0]: SBYB=1 to enter active mode + cmdBuffer[0] = MPL3115_ADDRESS << 1; + cmdBuffer[1] = MPL3115_CTRL_REG1; + txBuffer = 0xB9; + if (!I2C_XFER_SendDataBlocking(cmdBuffer, 2, &txBuffer, 1)) + return false; + + return true; +} + +/*FUNCTION**************************************************************** +* +* Function Name : mpl3115_read_data +* Returned Value : result +* Comments : Get current height and temperature from mpl3115. +* +*END*********************************************************************/ +bool mpl3115_read_data(pressure_sensor_t* pThisPressure) +{ + uint8_t rxBuffer[5]; + uint8_t cmdBuffer[3]; + + cmdBuffer[0] = MPL3115_ADDRESS << 1; + cmdBuffer[1] = MPL3115_OUT_P_MSB; + cmdBuffer[2] = (MPL3115_ADDRESS << 1) + 1; + if (!I2C_XFER_ReceiveDataBlocking(cmdBuffer, 3, rxBuffer, 5)) + return false; + + // place the read buffer into the 32 bit altitude and 16 bit temperature + pThisPressure->iHpFast = (rxBuffer[0] << 24) | (rxBuffer[1] << 16) | (rxBuffer[2] << 8); + pThisPressure->iTpFast = (rxBuffer[3] << 8) | rxBuffer[4]; + + return true; +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/mpl3115.h b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/mpl3115.h new file mode 100644 index 0000000..7606e7b --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/common/mpl3115.h @@ -0,0 +1,118 @@ +/* + * 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. + */ + +#ifndef __MPL3115_H__ +#define __MPL3115_H__ + +#include +#include + +/* I2C Slave Address define */ +#define MPL3115_ADDRESS (0x60) + +/* MPL3115 device ID number */ +#define MPL3115_DEVICE_ID (0xC4) + +/* MPL3115 Registers address definition */ +#define MPL3115_STATUS (0x00) +#define MPL3115_OUT_P_MSB (0x01) +#define MPL3115_OUT_P_CSB (0x02) +#define MPL3115_OUT_P_LSB (0x03) +#define MPL3115_OUT_T_MSB (0x04) +#define MPL3115_OUT_T_LSB (0x05) +#define MPL3115_DR_STATUS (0x06) +#define MPL3115_OUT_P_DELTA_MSB (0x07) +#define MPL3115_OUT_P_DELTA_CSB (0x08) +#define MPL3115_OUT_P_DELTA_LSB (0x09) +#define MPL3115_OUT_T_DELTA_MSB (0x0A) +#define MPL3115_OUT_T_DELTA_LSB (0x0B) +#define MPL3115_WHO_AM_I (0x0C) +#define MPL3115_F_STATUS (0x0D) +#define MPL3115_F_DATA (0x0E) +#define MPL3115_F_SETUP (0x0F) +#define MPL3115_TIME_DLY (0x10) +#define MPL3115_SYSMOD (0x11) +#define MPL3115_INT_SOURCE (0x12) +#define MPL3115_PT_DATA_CFG (0x13) +#define MPL3115_BAR_IN_MSB (0x14) +#define MPL3115_BAR_IN_LSB (0x15) +#define MPL3115_P_TGT_MSB (0x16) +#define MPL3115_P_TGT_LSB (0x17) +#define MPL3115_T_TGT (0x18) +#define MPL3115_P_WND_MSB (0x19) +#define MPL3115_P_WND_LSB (0x1A) +#define MPL3115_T_WND (0x1B) +#define MPL3115_P_MIN_MSB (0x1C) +#define MPL3115_P_MIN_CSB (0x1D) +#define MPL3115_P_MIN_LSB (0x1E) +#define MPL3115_T_MIN_MSB (0x1F) +#define MPL3115_T_MIN_LSB (0x20) +#define MPL3115_P_MAX_MSB (0x21) +#define MPL3115_P_MAX_CSB (0x22) +#define MPL3115_P_MAX_LSB (0x23) +#define MPL3115_T_MAX_MSB (0x24) +#define MPL3115_T_MAX_LSB (0x25) +#define MPL3115_CTRL_REG1 (0x26) +#define MPL3115_CTRL_REG2 (0x27) +#define MPL3115_CTRL_REG3 (0x28) +#define MPL3115_CTRL_REG4 (0x29) +#define MPL3115_CTRL_REG5 (0x2A) +#define MPL3115_OFF_P (0x2B) +#define MPL3115_OFF_T (0x2C) +#define MPL3115_OFF_H (0x2D) + +typedef struct _pressure_sensor +{ + int32_t iHp; // slow (typically 25Hz) height (counts) + int32_t iHpFast; // fast (typically 200Hz) height (counts) + int16_t iTp; // slow (typically 25Hz) temperature (count) + int16_t iTpFast; // fast (typically 200Hz) temperature (counts) + float fHp; // slow (typically 25Hz) height (m) + float fTp; // slow (typically 25Hz) temperature (C) + float fmPerCount; // initialized to FMPERCOUNT + float fCPerCount; // initialized to FCPERCPOUNT +} pressure_sensor_t; + +/* Function prototypes */ +#if defined(__cplusplus) +extern "C" { +#endif + +bool mpl3115_init(pressure_sensor_t*); +bool mpl3115_read_data(pressure_sensor_t*); + +#ifdef __cplusplus +} +#endif + +#endif /* __MPL3115_H__ */ +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/ds5/.cproject b/examples/imx7_colibri_m4/demo_apps/sensor_demo/ds5/.cproject new file mode 100644 index 0000000..24a8553 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/ds5/.project b/examples/imx7_colibri_m4/demo_apps/sensor_demo/ds5/.project new file mode 100644 index 0000000..858b6e0 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/ds5/.project @@ -0,0 +1,86 @@ + + + sensor_demo_imx7d_sdb_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 + + + freertos2virtual:/virtualfreertos/port.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.cfreertos2virtual:/virtualfreertos/portmacro.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.hstartup2virtual:/virtualstartup/startup_MCIMX7D_M4.s1PARENT-5-PROJECT_LOC/platform/devices/MCIMX7D/startup/arm/startup_MCIMX7D_M4.sfreertos2virtual:/virtualfreertos/heap_2.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/portable/MemMang/heap_2.cboard2virtual:/virtualboard/FreeRTOSConfig.h1PARENT-3-PROJECT_LOC/FreeRTOSConfig.hsource2virtual:/virtualsource/main.c1PARENT-1-PROJECT_LOC/sensor_demo_imx7d/main.csource2virtual:/virtualsource/i2c_xfer.c1PARENT-1-PROJECT_LOC/common/i2c_xfer.csource2virtual:/virtualsource/i2c_xfer.h1PARENT-1-PROJECT_LOC/common/i2c_xfer.hsource2virtual:/virtualsource/mpl3115.c1PARENT-1-PROJECT_LOC/common/mpl3115.csource2virtual:/virtualsource/mpl3115.h1PARENT-1-PROJECT_LOC/common/mpl3115.hsource2virtual:/virtualsource/fxos8700.c1PARENT-1-PROJECT_LOC/common/fxos8700.csource2virtual:/virtualsource/fxos8700.h1PARENT-1-PROJECT_LOC/common/fxos8700.hsource2virtual:/virtualsource/fxas21002.c1PARENT-1-PROJECT_LOC/common/fxas21002.csource2virtual:/virtualsource/fxas21002.h1PARENT-1-PROJECT_LOC/common/fxas21002.hdriver2virtual:/virtualdriver/i2c_imx.c1PARENT-5-PROJECT_LOC/platform/drivers/src/i2c_imx.cdriver2virtual:/virtualdriver/i2c_imx.h1PARENT-5-PROJECT_LOC/platform/drivers/inc/i2c_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.hfreertos2virtual:/virtualfreertos/croutine.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/croutine.hfreertos2virtual:/virtualfreertos/event_groups.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/event_groups.hfreertos2virtual:/virtualfreertos/FreeRTOS.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/FreeRTOS.hfreertos2virtual:/virtualfreertos/list.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/list.hfreertos2virtual:/virtualfreertos/mpu_wrappers.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/mpu_wrappers.hfreertos2virtual:/virtualfreertos/portable.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/portable.hfreertos2virtual:/virtualfreertos/projdefs.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/projdefs.hfreertos2virtual:/virtualfreertos/queue.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/queue.hfreertos2virtual:/virtualfreertos/semphr.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/semphr.hfreertos2virtual:/virtualfreertos/StackMacros.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/StackMacros.hfreertos2virtual:/virtualfreertos/task.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/task.hfreertos2virtual:/virtualfreertos/timers.h1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/include/timers.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.hfreertos2virtual:/virtualfreertos/croutine.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/croutine.cfreertos2virtual:/virtualfreertos/event_groups.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/event_groups.cfreertos2virtual:/virtualfreertos/list.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/list.cfreertos2virtual:/virtualfreertos/queue.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/queue.cfreertos2virtual:/virtualfreertos/tasks.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/tasks.cfreertos2virtual:/virtualfreertos/timers.c1PARENT-5-PROJECT_LOC/rtos/FreeRTOS/Source/timers.csystem2virtual:/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.cutilities2virtual:/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.hstartup2virtual:/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.c + + + diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/ds5/makedir.bat b/examples/imx7_colibri_m4/demo_apps/sensor_demo/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/ds5/sensor_demo.wsd b/examples/imx7_colibri_m4/demo_apps/sensor_demo/ds5/sensor_demo.wsd new file mode 100644 index 0000000..0e22b0b --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/ds5/sensor_demo.wsd @@ -0,0 +1,9 @@ + + + + sensor_demo_imx7d_sdb_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/hardware_init.c b/examples/imx7_colibri_m4/demo_apps/sensor_demo/hardware_init.c new file mode 100644 index 0000000..3ffd205 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/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/imx7_colibri_m4/demo_apps/sensor_demo/iar/sensor_demo.ewd b/examples/imx7_colibri_m4/demo_apps/sensor_demo/iar/sensor_demo.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/iar/sensor_demo.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/imx7_colibri_m4/demo_apps/sensor_demo/iar/sensor_demo.ewp b/examples/imx7_colibri_m4/demo_apps/sensor_demo/iar/sensor_demo.ewp new file mode 100644 index 0000000..8ef8f27 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/iar/sensor_demo.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 + + + + + + + + +freertos$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/port.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/portasm.s$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/portable/MemMang/heap_2.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/croutine.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/event_groups.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/FreeRTOS.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/list.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/mpu_wrappers.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/portable.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/projdefs.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/queue.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/semphr.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/StackMacros.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/task.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/include/timers.h$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/croutine.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/event_groups.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/list.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/queue.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/tasks.c$PROJ_DIR$/../../../../../rtos/FreeRTOS/Source/timers.cstartup$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.hboard$PROJ_DIR$/../../../FreeRTOSConfig.h$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$/../sensor_demo_imx7d/main.c$PROJ_DIR$/../common/i2c_xfer.c$PROJ_DIR$/../common/i2c_xfer.h$PROJ_DIR$/../common/mpl3115.c$PROJ_DIR$/../common/mpl3115.h$PROJ_DIR$/../common/fxos8700.c$PROJ_DIR$/../common/fxos8700.h$PROJ_DIR$/../common/fxas21002.c$PROJ_DIR$/../common/fxas21002.hdriver$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.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.cutilities$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.h diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/iar/sensor_demo.eww b/examples/imx7_colibri_m4/demo_apps/sensor_demo/iar/sensor_demo.eww new file mode 100644 index 0000000..f300b1c --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/iar/sensor_demo.eww @@ -0,0 +1,4 @@ + + +allsensor_demoReleasesensor_demoDebugReleasesensor_demoReleaseDebugsensor_demoDebug +$WS_DIR$/sensor_demo.ewp diff --git a/examples/imx7_colibri_m4/demo_apps/sensor_demo/sensor_demo_imx7d/main.c b/examples/imx7_colibri_m4/demo_apps/sensor_demo/sensor_demo_imx7d/main.c new file mode 100644 index 0000000..6f87be1 --- /dev/null +++ b/examples/imx7_colibri_m4/demo_apps/sensor_demo/sensor_demo_imx7d/main.c @@ -0,0 +1,237 @@ +/* + * 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. + */ + +/////////////////////////////////////////////////////////////////////////////// +// Includes +/////////////////////////////////////////////////////////////////////////////// +#include +#include +#include "FreeRTOS.h" +#include "task.h" +#include "board.h" +#include "debug_console_imx.h" +#include "i2c_xfer.h" +#include "fxas21002.h" +#include "fxos8700.h" +#include "mpl3115.h" + +//////////////////////////////////////////////////////////////////////////////// +// Definition +//////////////////////////////////////////////////////////////////////////////// +#define HEIGHT_UPDATE_THRESHOLD (0.5f) +#define TEMP_UPDATE_THRESHOLD (0.3f) +#define GYRO_UPDATE_THRESHOLD (5.0f) + +//////////////////////////////////////////////////////////////////////////////// +// Code +//////////////////////////////////////////////////////////////////////////////// +void fxas21002Demo(void) +{ + gyro_sensor_t thisGyroSensor; + uint32_t count = 0, printCount = 0; + + PRINTF("\n\r-------------- FXAS21002 Gyro data acquisition --------------\n\r\n\r"); + + PRINTF("FXAS21002 initialization ... "); + if (fxas21002_init(&thisGyroSensor)) + PRINTF("OK\n\r"); + else + PRINTF("ERROR\n\r"); + + /* delay 10ms to wait sensor init finish */ + vTaskDelay(10); + + while(1) + { + fxas21002_read_data(&thisGyroSensor); + thisGyroSensor.iSumYpFast[0] += thisGyroSensor.iYpFast[0]; + thisGyroSensor.iSumYpFast[1] += thisGyroSensor.iYpFast[1]; + thisGyroSensor.iSumYpFast[2] += thisGyroSensor.iYpFast[2]; + + count++; + if (count == OVERSAMPLE_RATIO) + { + count = 0; + thisGyroSensor.iYp[0] = thisGyroSensor.iSumYpFast[0] / OVERSAMPLE_RATIO; + thisGyroSensor.iYp[1] = thisGyroSensor.iSumYpFast[1] / OVERSAMPLE_RATIO; + thisGyroSensor.iYp[2] = thisGyroSensor.iSumYpFast[2] / OVERSAMPLE_RATIO; + thisGyroSensor.fYp[0] = thisGyroSensor.iYp[0] * thisGyroSensor.fDegPerSecPerCount; + thisGyroSensor.fYp[1] = thisGyroSensor.iYp[1] * thisGyroSensor.fDegPerSecPerCount; + thisGyroSensor.fYp[2] = thisGyroSensor.iYp[2] * thisGyroSensor.fDegPerSecPerCount; + thisGyroSensor.iSumYpFast[0] = 0; + thisGyroSensor.iSumYpFast[1] = 0; + thisGyroSensor.iSumYpFast[2] = 0; + } + + if ((thisGyroSensor.fYp[0] > GYRO_UPDATE_THRESHOLD) || + (thisGyroSensor.fYp[0] < -GYRO_UPDATE_THRESHOLD) || + (thisGyroSensor.fYp[1] > GYRO_UPDATE_THRESHOLD) || + (thisGyroSensor.fYp[1] < -GYRO_UPDATE_THRESHOLD) || + (thisGyroSensor.fYp[2] > GYRO_UPDATE_THRESHOLD) || + (thisGyroSensor.fYp[2] < -GYRO_UPDATE_THRESHOLD)) + { + printCount++; + if (40 == printCount) + { + printCount = 0; + PRINTF("[FXAS21002] Rotate detected: X:%5.1fdps, Y:%5.1fdps, Z:%5.1fdps\n\r",\ + thisGyroSensor.fYp[0], thisGyroSensor.fYp[1], thisGyroSensor.fYp[2]); + } + } + } +} + +void fxos8700Demo(void) +{ + int16_t Ax, Ay, Az, Mx, My, Mz; + float Axf, Ayf, Azf, Mxf, Myf, Mzf; + + PRINTF("\n\r-------------- FXOS8700 Acc+Mag data acquisition --------------\n\r\n\r"); + + PRINTF("FXOS8700 initialization ... "); + if (fxos8700_init()) + PRINTF("OK\n\r"); + else + PRINTF("ERROR\n\r"); + + while(1) + { + vTaskDelay(500); + fxos8700_read_data(&Ax, &Ay, &Az, &Mx, &My, &Mz); + Axf = Ax / 8192.0; + Ayf = Ay / 8192.0; + Azf = Az / 8192.0; + Mxf = Mx * 0.1; + Myf = My * 0.1; + Mzf = Mz * 0.1; + PRINTF("[FXOS8700]Current Acc:X=%7.1fg Y=%7.1fg Z=%7.1fg\n\r",Axf, Ayf, Azf); + PRINTF("[FXOS8700]Current Mag:X=%6.1fuT Y=%6.1fuT Z=%6.1fuT\n\r",Mxf, Myf, Mzf); + } +} + +void mpl3115Demo(void) +{ + pressure_sensor_t thisPressureSensor; + float lastHight = 0, lastTemp = 0; + + PRINTF("\n\r-------------- MPL3115 Pressure data acquisition --------------\n\r\n\r"); + + PRINTF("MPL3115 initialization ... "); + if (mpl3115_init(&thisPressureSensor)) + PRINTF("OK\n\r"); + else + PRINTF("ERROR\n\r"); + + while(1) + { + vTaskDelay(100); + mpl3115_read_data(&thisPressureSensor); + thisPressureSensor.iHp = thisPressureSensor.iHpFast;; + thisPressureSensor.iTp = thisPressureSensor.iTpFast; + thisPressureSensor.fHp = (float) thisPressureSensor.iHp *\ + thisPressureSensor.fmPerCount; + thisPressureSensor.fTp = (float) thisPressureSensor.iTp *\ + thisPressureSensor.fCPerCount; + if (((thisPressureSensor.fHp - lastHight) > HEIGHT_UPDATE_THRESHOLD) || + ((thisPressureSensor.fHp - lastHight) < -HEIGHT_UPDATE_THRESHOLD) || + ((thisPressureSensor.fTp - lastTemp) > TEMP_UPDATE_THRESHOLD) || + ((thisPressureSensor.fTp - lastTemp) < -TEMP_UPDATE_THRESHOLD)) + { + lastHight = thisPressureSensor.fHp; + lastTemp = thisPressureSensor.fTp; + PRINTF("[MPL3115]Current Height = %6.1fMeter, Current Temp = %5.1fCelsius\n\r", + thisPressureSensor.fHp, + thisPressureSensor.fTp); + } + } +} + +void MainTask(void *pvParameters) +{ + uint8_t demoSel; + + PRINTF("\n\r-------------- iMX7D SDB on board sensor example --------------\n\r\n\r"); + + /* Setup I2C init structure. */ + i2c_init_config_t i2cInitConfig = { + .clockRate = get_i2c_clock_freq(BOARD_I2C_BASEADDR), + .baudRate = 400000u, + .slaveAddress = 0x00 + }; + + /* Initialize I2C module with I2C init structure. */ + I2C_XFER_Config(&i2cInitConfig); + + /* Print the initial banner. */ + PRINTF("\n\rPlease select the sensor demo you want to run:\n\r"); + PRINTF("[1].FXAS21002 3-axes Gyro sensor\n\r"); + PRINTF("[2].FXOS8700 6-axes Acc+Mag sensor\n\r"); + PRINTF("[3].MPL3115 Pressure sensor\n\r"); + + while(1) + { + demoSel = GETCHAR(); + if (('1' == demoSel) || ('2' == demoSel) || ('3' == demoSel)) + break; + } + + switch(demoSel) + { + case '1': + fxas21002Demo(); + break; + case '2': + fxos8700Demo(); + break; + case '3': + mpl3115Demo(); + break; + } +} + +int main(void) +{ + /* Initialize board specified hardware. */ + hardware_init(); + + /* Create a the APP main task. */ + xTaskCreate(MainTask, "Main Task", configMINIMAL_STACK_SIZE + 100, + NULL, tskIDLE_PRIORITY+1, NULL); + + /* Start FreeRTOS scheduler. */ + vTaskStartScheduler(); + + /* should never reach this point. */ + while (true); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/CMakeLists.txt b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/CMakeLists.txt new file mode 100644 index 0000000..c6d27e8 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_all.bat b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_all.bat new file mode 100755 index 0000000..6d41d86 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_all.sh b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_all.sh new file mode 100755 index 0000000..ebb0c25 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_debug.bat b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_debug.bat new file mode 100755 index 0000000..bf3b902 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_debug.sh b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_debug.sh new file mode 100755 index 0000000..571868b --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_release.bat b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_release.bat new file mode 100755 index 0000000..e229a83 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_release.sh b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/build_release.sh new file mode 100755 index 0000000..035ce4e --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/clean.bat b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/clean.sh b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/adc_imx7d/ds5/.cproject b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/ds5/.cproject new file mode 100644 index 0000000..d5a911c --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7_colibri_m4/driver_examples/adc_imx7d/ds5/.project b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/ds5/.project new file mode 100644 index 0000000..a777294 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/ds5/.project @@ -0,0 +1,86 @@ + + + adc_imx7d_example_imx7d_sdb_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/imx7_colibri_m4/driver_examples/adc_imx7d/ds5/adc_imx7d_example.wsd b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/ds5/adc_imx7d_example.wsd new file mode 100644 index 0000000..c6d95b5 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/ds5/adc_imx7d_example.wsd @@ -0,0 +1,9 @@ + + + + adc_imx7d_example_imx7d_sdb_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7_colibri_m4/driver_examples/adc_imx7d/ds5/makedir.bat b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7_colibri_m4/driver_examples/adc_imx7d/hardware_init.c b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/hardware_init.c new file mode 100644 index 0000000..52fcabc --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.ewd b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.ewp b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.ewp new file mode 100644 index 0000000..3e84c94 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.eww b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/iar/adc_imx7d_example.eww new file mode 100644 index 0000000..b9ee8e1 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/adc_imx7d/main.c b/examples/imx7_colibri_m4/driver_examples/adc_imx7d/main.c new file mode 100644 index 0000000..42bb2e1 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/CMakeLists.txt b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/CMakeLists.txt new file mode 100644 index 0000000..97f64f2 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_all.bat b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_all.bat new file mode 100755 index 0000000..0cf721f --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_all.sh b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_all.sh new file mode 100755 index 0000000..3827529 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_debug.bat b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_debug.bat new file mode 100755 index 0000000..e9ccfdd --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_debug.sh b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_debug.sh new file mode 100755 index 0000000..effd076 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_release.bat b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_release.bat new file mode 100755 index 0000000..0759349 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_release.sh b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/build_release.sh new file mode 100755 index 0000000..a12067d --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/clean.bat b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/clean.sh b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/ds5/.cproject b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/ds5/.cproject new file mode 100644 index 0000000..1f636d3 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/ds5/.project b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/ds5/.project new file mode 100644 index 0000000..1356bd8 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/ds5/.project @@ -0,0 +1,86 @@ + + + flexcan_loopback_example_imx7d_sdb_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/ds5/flexcan_loopback_example.wsd b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/ds5/flexcan_loopback_example.wsd new file mode 100644 index 0000000..8333193 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/ds5/flexcan_loopback_example.wsd @@ -0,0 +1,9 @@ + + + + flexcan_loopback_example_imx7d_sdb_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/ds5/makedir.bat b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/hardware_init.c b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/hardware_init.c new file mode 100644 index 0000000..ad34e0e --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.ewd b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.ewp b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.ewp new file mode 100644 index 0000000..1c34180 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.eww b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/iar/flexcan_loopback_example.eww new file mode 100644 index 0000000..dec459a --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/main.c b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_loopback/main.c new file mode 100644 index 0000000..b269e92 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/CMakeLists.txt b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/CMakeLists.txt new file mode 100644 index 0000000..365d270 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_all.bat b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_all.bat new file mode 100755 index 0000000..0cf721f --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_all.sh b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_all.sh new file mode 100755 index 0000000..3827529 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_debug.bat b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_debug.bat new file mode 100755 index 0000000..e9ccfdd --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_debug.sh b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_debug.sh new file mode 100755 index 0000000..effd076 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_release.bat b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_release.bat new file mode 100755 index 0000000..0759349 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_release.sh b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/build_release.sh new file mode 100755 index 0000000..a12067d --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/clean.bat b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/clean.sh b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/ds5/.cproject b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/ds5/.cproject new file mode 100644 index 0000000..a124a86 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/ds5/.project b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/ds5/.project new file mode 100644 index 0000000..e318377 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/ds5/.project @@ -0,0 +1,86 @@ + + + flexcan_network_example_imx7d_sdb_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/ds5/flexcan_network_example.wsd b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/ds5/flexcan_network_example.wsd new file mode 100644 index 0000000..8453f80 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/ds5/flexcan_network_example.wsd @@ -0,0 +1,9 @@ + + + + flexcan_network_example_imx7d_sdb_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/ds5/makedir.bat b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/hardware_init.c b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/hardware_init.c new file mode 100644 index 0000000..ad34e0e --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.ewd b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.ewp b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.ewp new file mode 100644 index 0000000..4359073 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.eww b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/iar/flexcan_network_example.eww new file mode 100644 index 0000000..e2faa39 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/main.c b/examples/imx7_colibri_m4/driver_examples/flexcan/flexcan_network/main.c new file mode 100644 index 0000000..232b24a --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/CMakeLists.txt b/examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/CMakeLists.txt new file mode 100644 index 0000000..259676e --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_all.bat b/examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_all.bat new file mode 100755 index 0000000..6d41d86 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_all.sh b/examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_all.sh new file mode 100755 index 0000000..ebb0c25 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_debug.bat b/examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_debug.bat new file mode 100755 index 0000000..bf3b902 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_debug.sh b/examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_debug.sh new file mode 100755 index 0000000..571868b --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_release.bat b/examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_release.bat new file mode 100755 index 0000000..e229a83 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_release.sh b/examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/build_release.sh new file mode 100755 index 0000000..035ce4e --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/clean.bat b/examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/clean.sh b/examples/imx7_colibri_m4/driver_examples/gpio_imx/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpio_imx/ds5/.cproject b/examples/imx7_colibri_m4/driver_examples/gpio_imx/ds5/.cproject new file mode 100644 index 0000000..b31cba4 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/gpio_imx/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7_colibri_m4/driver_examples/gpio_imx/ds5/.project b/examples/imx7_colibri_m4/driver_examples/gpio_imx/ds5/.project new file mode 100644 index 0000000..ade2065 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/gpio_imx/ds5/.project @@ -0,0 +1,86 @@ + + + gpio_imx_example_imx7d_sdb_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/imx7_colibri_m4/driver_examples/gpio_imx/ds5/gpio_imx_example.wsd b/examples/imx7_colibri_m4/driver_examples/gpio_imx/ds5/gpio_imx_example.wsd new file mode 100644 index 0000000..e303892 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/gpio_imx/ds5/gpio_imx_example.wsd @@ -0,0 +1,9 @@ + + + + gpio_imx_example_imx7d_sdb_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7_colibri_m4/driver_examples/gpio_imx/ds5/makedir.bat b/examples/imx7_colibri_m4/driver_examples/gpio_imx/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/gpio_imx/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7_colibri_m4/driver_examples/gpio_imx/hardware_init.c b/examples/imx7_colibri_m4/driver_examples/gpio_imx/hardware_init.c new file mode 100644 index 0000000..eacaaba --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/gpio_imx/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 "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_KEY_RDC_PDAP, 0xFF, false, false); + + /* Enable gpio clock gate */ + CCM_ControlGate(CCM, BOARD_GPIO_CCM_CCGR, ccmClockNeededRunWait); + /* Configure gpio pin IOMUX */ + configure_gpio_pin(BOARD_GPIO_KEY_CONFIG); +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/driver_examples/gpio_imx/iar/gpio_imx_example.ewd b/examples/imx7_colibri_m4/driver_examples/gpio_imx/iar/gpio_imx_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpio_imx/iar/gpio_imx_example.ewp b/examples/imx7_colibri_m4/driver_examples/gpio_imx/iar/gpio_imx_example.ewp new file mode 100644 index 0000000..9873a22 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpio_imx/iar/gpio_imx_example.eww b/examples/imx7_colibri_m4/driver_examples/gpio_imx/iar/gpio_imx_example.eww new file mode 100644 index 0000000..e6fbb01 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpio_imx/main.c b/examples/imx7_colibri_m4/driver_examples/gpio_imx/main.c new file mode 100644 index 0000000..bc51468 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpt/armgcc/CMakeLists.txt b/examples/imx7_colibri_m4/driver_examples/gpt/armgcc/CMakeLists.txt new file mode 100644 index 0000000..271de2f --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpt/armgcc/build_all.bat b/examples/imx7_colibri_m4/driver_examples/gpt/armgcc/build_all.bat new file mode 100755 index 0000000..6d41d86 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpt/armgcc/build_all.sh b/examples/imx7_colibri_m4/driver_examples/gpt/armgcc/build_all.sh new file mode 100755 index 0000000..ebb0c25 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpt/armgcc/build_debug.bat b/examples/imx7_colibri_m4/driver_examples/gpt/armgcc/build_debug.bat new file mode 100755 index 0000000..bf3b902 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpt/armgcc/build_debug.sh b/examples/imx7_colibri_m4/driver_examples/gpt/armgcc/build_debug.sh new file mode 100755 index 0000000..571868b --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpt/armgcc/build_release.bat b/examples/imx7_colibri_m4/driver_examples/gpt/armgcc/build_release.bat new file mode 100755 index 0000000..e229a83 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpt/armgcc/build_release.sh b/examples/imx7_colibri_m4/driver_examples/gpt/armgcc/build_release.sh new file mode 100755 index 0000000..035ce4e --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpt/armgcc/clean.bat b/examples/imx7_colibri_m4/driver_examples/gpt/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpt/armgcc/clean.sh b/examples/imx7_colibri_m4/driver_examples/gpt/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpt/ds5/.cproject b/examples/imx7_colibri_m4/driver_examples/gpt/ds5/.cproject new file mode 100644 index 0000000..88a81ae --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/gpt/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7_colibri_m4/driver_examples/gpt/ds5/.project b/examples/imx7_colibri_m4/driver_examples/gpt/ds5/.project new file mode 100644 index 0000000..d6b5a5b --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/gpt/ds5/.project @@ -0,0 +1,86 @@ + + + gpt_example_imx7d_sdb_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/imx7_colibri_m4/driver_examples/gpt/ds5/gpt_example.wsd b/examples/imx7_colibri_m4/driver_examples/gpt/ds5/gpt_example.wsd new file mode 100644 index 0000000..b055faa --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/gpt/ds5/gpt_example.wsd @@ -0,0 +1,9 @@ + + + + gpt_example_imx7d_sdb_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7_colibri_m4/driver_examples/gpt/ds5/makedir.bat b/examples/imx7_colibri_m4/driver_examples/gpt/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/gpt/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7_colibri_m4/driver_examples/gpt/hardware_init.c b/examples/imx7_colibri_m4/driver_examples/gpt/hardware_init.c new file mode 100644 index 0000000..b43ffbb --- /dev/null +++ b/examples/imx7_colibri_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_GPTB_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/imx7_colibri_m4/driver_examples/gpt/iar/gpt_example.ewd b/examples/imx7_colibri_m4/driver_examples/gpt/iar/gpt_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpt/iar/gpt_example.ewp b/examples/imx7_colibri_m4/driver_examples/gpt/iar/gpt_example.ewp new file mode 100644 index 0000000..3a2b848 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpt/iar/gpt_example.eww b/examples/imx7_colibri_m4/driver_examples/gpt/iar/gpt_example.eww new file mode 100644 index 0000000..4e7ff2a --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/gpt/main.c b/examples/imx7_colibri_m4/driver_examples/gpt/main.c new file mode 100644 index 0000000..8292b03 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/CMakeLists.txt b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/CMakeLists.txt new file mode 100644 index 0000000..82ecfcc --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_all.bat b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_all.bat new file mode 100755 index 0000000..0cf721f --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_all.sh b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_all.sh new file mode 100755 index 0000000..3827529 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_debug.bat b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_debug.bat new file mode 100755 index 0000000..e9ccfdd --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_debug.sh b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_debug.sh new file mode 100755 index 0000000..effd076 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_release.bat b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_release.bat new file mode 100755 index 0000000..0759349 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_release.sh b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/build_release.sh new file mode 100755 index 0000000..a12067d --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/clean.bat b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/clean.sh b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/ds5/.cproject b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/ds5/.cproject new file mode 100644 index 0000000..c30bba7 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/ds5/.project b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/ds5/.project new file mode 100644 index 0000000..4239d67 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/ds5/.project @@ -0,0 +1,86 @@ + + + uart_imx_interrupt_example_imx7d_sdb_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/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/ds5/makedir.bat b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/ds5/uart_imx_interrupt_example.wsd b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/ds5/uart_imx_interrupt_example.wsd new file mode 100644 index 0000000..f249955 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/ds5/uart_imx_interrupt_example.wsd @@ -0,0 +1,9 @@ + + + + uart_imx_interrupt_example_imx7d_sdb_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/hardware_init.c b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/hardware_init.c new file mode 100644 index 0000000..b9efeaf --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.ewd b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.ewp b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.ewp new file mode 100644 index 0000000..e481dee --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.eww b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/iar/uart_imx_interrupt_example.eww new file mode 100644 index 0000000..479e121 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/main.c b/examples/imx7_colibri_m4/driver_examples/uart_imx/uart_interrupt/main.c new file mode 100644 index 0000000..5cef7aa --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/CMakeLists.txt b/examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/CMakeLists.txt new file mode 100644 index 0000000..3e9f4f0 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_all.bat b/examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_all.bat new file mode 100755 index 0000000..6d41d86 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_all.sh b/examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_all.sh new file mode 100755 index 0000000..ebb0c25 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_debug.bat b/examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_debug.bat new file mode 100755 index 0000000..bf3b902 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_debug.sh b/examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_debug.sh new file mode 100755 index 0000000..571868b --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_release.bat b/examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_release.bat new file mode 100755 index 0000000..e229a83 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_release.sh b/examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/build_release.sh new file mode 100755 index 0000000..035ce4e --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/clean.bat b/examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/clean.bat new file mode 100755 index 0000000..ffea088 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/clean.sh b/examples/imx7_colibri_m4/driver_examples/wdog_imx/armgcc/clean.sh new file mode 100755 index 0000000..795ad87 --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/wdog_imx/ds5/.cproject b/examples/imx7_colibri_m4/driver_examples/wdog_imx/ds5/.cproject new file mode 100644 index 0000000..84b4a99 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/wdog_imx/ds5/.cproject @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/imx7_colibri_m4/driver_examples/wdog_imx/ds5/.project b/examples/imx7_colibri_m4/driver_examples/wdog_imx/ds5/.project new file mode 100644 index 0000000..4d130bb --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/wdog_imx/ds5/.project @@ -0,0 +1,86 @@ + + + wdog_imx_example_imx7d_sdb_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/imx7_colibri_m4/driver_examples/wdog_imx/ds5/makedir.bat b/examples/imx7_colibri_m4/driver_examples/wdog_imx/ds5/makedir.bat new file mode 100755 index 0000000..4860035 --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/wdog_imx/ds5/makedir.bat @@ -0,0 +1 @@ +IF NOT EXIST "%1" mkdir "%1" diff --git a/examples/imx7_colibri_m4/driver_examples/wdog_imx/ds5/wdog_imx_example.wsd b/examples/imx7_colibri_m4/driver_examples/wdog_imx/ds5/wdog_imx_example.wsd new file mode 100644 index 0000000..507dc3d --- /dev/null +++ b/examples/imx7_colibri_m4/driver_examples/wdog_imx/ds5/wdog_imx_example.wsd @@ -0,0 +1,9 @@ + + + + wdog_imx_example_imx7d_sdb_m4.truereleasefalsedebugfalse + + + + + diff --git a/examples/imx7_colibri_m4/driver_examples/wdog_imx/hardware_init.c b/examples/imx7_colibri_m4/driver_examples/wdog_imx/hardware_init.c new file mode 100644 index 0000000..8f0d50f --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/wdog_imx/iar/wdog_imx_example.ewd b/examples/imx7_colibri_m4/driver_examples/wdog_imx/iar/wdog_imx_example.ewd new file mode 100644 index 0000000..7f9ea8c --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/wdog_imx/iar/wdog_imx_example.ewp b/examples/imx7_colibri_m4/driver_examples/wdog_imx/iar/wdog_imx_example.ewp new file mode 100644 index 0000000..27da58b --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/wdog_imx/iar/wdog_imx_example.eww b/examples/imx7_colibri_m4/driver_examples/wdog_imx/iar/wdog_imx_example.eww new file mode 100644 index 0000000..d58e53d --- /dev/null +++ b/examples/imx7_colibri_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/imx7_colibri_m4/driver_examples/wdog_imx/main.c b/examples/imx7_colibri_m4/driver_examples/wdog_imx/main.c new file mode 100644 index 0000000..53c0756 --- /dev/null +++ b/examples/imx7_colibri_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 + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/gpio_pins.c b/examples/imx7_colibri_m4/gpio_pins.c new file mode 100644 index 0000000..3e2d167 --- /dev/null +++ b/examples/imx7_colibri_m4/gpio_pins.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 +#include "gpio_pins.h" + +gpio_config_t gpioKeyFunc1 = { + "FUNC1", /* name */ + &IOMUXC_SW_MUX_CTL_PAD_SD2_RESET_B, /* muxReg */ + 5, /* muxConfig */ + &IOMUXC_SW_PAD_CTL_PAD_SD2_RESET_B, /* padReg */ + IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO14_PS(2) | /* padConfig */ + IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO14_PE_MASK | + IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO14_HYS_MASK, + GPIO5, /* base */ + 11 /* pin */ +}; + +gpio_config_t gpioKeyFunc2 = { + "FUNC2", /* name */ + &IOMUXC_SW_MUX_CTL_PAD_SD2_WP, /* muxReg */ + 5, /* muxConfig */ + &IOMUXC_SW_PAD_CTL_PAD_SD2_WP, /* padReg */ + IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO15_PS(2) | /* padConfig */ + IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO15_PE_MASK | + IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO15_HYS_MASK, + GPIO5, /* base */ + 10 /* pin */ +}; + +void configure_gpio_pin(gpio_config_t *config) +{ + assert(config); + + *(config->muxReg) = config->muxConfig; + *(config->padReg) = config->padConfig; +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/gpio_pins.h b/examples/imx7_colibri_m4/gpio_pins.h new file mode 100644 index 0000000..7a89afd --- /dev/null +++ b/examples/imx7_colibri_m4/gpio_pins.h @@ -0,0 +1,62 @@ +/* + * 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. + */ + +#ifndef __GPIO_PINS_H__ +#define __GPIO_PINS_H__ + +#include "device_imx.h" + +/*! @brief i.MX GPIO initialize structure. */ +typedef struct _gpio_config +{ + const char *name; + __IO uint32_t *muxReg; + uint32_t muxConfig; + __IO uint32_t *padReg; + uint32_t padConfig; + GPIO_Type *base; + uint32_t pin; +} gpio_config_t; + +#if defined(__cplusplus) +extern "C" { +#endif /* __cplusplus */ + +/*! @brief GPIO pin configuration */ +extern gpio_config_t gpioKeyFunc1; +extern gpio_config_t gpioKeyFunc2; + +/*! @brief Configure specific GPIO pin */ +void configure_gpio_pin(gpio_config_t *config); + +#endif /* __GPIO_PINS_H__ */ +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/pin_mux.c b/examples/imx7_colibri_m4/pin_mux.c new file mode 100644 index 0000000..46397e3 --- /dev/null +++ b/examples/imx7_colibri_m4/pin_mux.c @@ -0,0 +1,197 @@ +/* + * 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. + */ + +/*! +** @addtogroup pin_mux_module pin_mux module documentation +** @{ +*/ + +/* MODULE pin_mux. */ + +#include "device_imx.h" +#include "pin_mux.h" + +void configure_flexcan_pins(CAN_Type* base) +{ + volatile GPIO_MemMapPtr gpio2_pdir; + void *addr; + + switch((uint32_t)base) + { + case CAN1_BASE: + /*CAN 1 is not used in SDB Board*/ + break; + case CAN2_BASE: + // CAN2_STB DRIVE LOW + /* R431 Connected */ + /* R435 not Connected */ + /* SDDO14 is floated (EPDC Expansion Slot J13)*/ + IOMUXC_SW_MUX_CTL_PAD_EPDC_DATA14 = IOMUXC_SW_MUX_CTL_PAD_EPDC_DATA14_MUX_MODE(5); // GPIO2[14] + IOMUXC_SW_PAD_CTL_PAD_EPDC_DATA14 = IOMUXC_SW_PAD_CTL_PAD_EPDC_DATA14_PE_MASK | + IOMUXC_SW_PAD_CTL_PAD_EPDC_DATA14_PS(3) | + IOMUXC_SW_PAD_CTL_PAD_EPDC_DATA14_DSE(0) | + IOMUXC_SW_PAD_CTL_PAD_EPDC_DATA14_HYS_MASK; + addr = (void *) GPIO2_BASE_PTR; + gpio2_pdir = addr; + gpio2_pdir->GDIR |= 0x00004000; + gpio2_pdir->DR &= ~(0x00004000); + + // CAN2_TX + IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO15 = IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO15_MUX_MODE(3); + IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO15 = IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO15_PE_MASK | + IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO15_PS(3) | + IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO15_DSE(0) | + IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO15_HYS_MASK; + + // CAN2_RX + IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO14 = IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO14_MUX_MODE(3); + IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO14 = IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO14_PE_MASK | + IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO14_PS(3) | + IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO14_DSE(0) | + IOMUXC_SW_PAD_CTL_PAD_GPIO1_IO14_HYS_MASK; + break; + } +} + +void configure_i2c_pins(I2C_Type* base) +{ + switch((uint32_t)base) + { + case I2C1_BASE: + // I2C1 iomux configuration + IOMUXC_SW_MUX_CTL_PAD_I2C1_SCL = IOMUXC_SW_MUX_CTL_PAD_I2C1_SCL_MUX_MODE(0) | + IOMUXC_SW_MUX_CTL_PAD_I2C1_SCL_SION_MASK; + IOMUXC_SW_MUX_CTL_PAD_I2C1_SDA = IOMUXC_SW_MUX_CTL_PAD_I2C1_SDA_MUX_MODE(0) | + IOMUXC_SW_MUX_CTL_PAD_I2C1_SDA_SION_MASK; + + IOMUXC_I2C1_SCL_SELECT_INPUT = IOMUXC_I2C1_SCL_SELECT_INPUT_DAISY(1); + IOMUXC_I2C1_SDA_SELECT_INPUT = IOMUXC_I2C1_SDA_SELECT_INPUT_DAISY(1); + + IOMUXC_SW_PAD_CTL_PAD_I2C1_SCL = IOMUXC_SW_PAD_CTL_PAD_I2C1_SCL_PE_MASK | + IOMUXC_SW_PAD_CTL_PAD_I2C1_SCL_PS(3) | + IOMUXC_SW_PAD_CTL_PAD_I2C1_SCL_DSE(0) | + IOMUXC_SW_PAD_CTL_PAD_I2C1_SCL_HYS_MASK; + + IOMUXC_SW_PAD_CTL_PAD_I2C1_SDA = IOMUXC_SW_PAD_CTL_PAD_I2C1_SDA_PE_MASK | + IOMUXC_SW_PAD_CTL_PAD_I2C1_SDA_PS(3) | + IOMUXC_SW_PAD_CTL_PAD_I2C1_SDA_DSE(0) | + IOMUXC_SW_PAD_CTL_PAD_I2C1_SDA_HYS_MASK; + break; + case I2C2_BASE: + // I2C2 iomux configuration + IOMUXC_SW_MUX_CTL_PAD_I2C2_SCL = IOMUXC_SW_MUX_CTL_PAD_I2C2_SCL_MUX_MODE(0) | + IOMUXC_SW_MUX_CTL_PAD_I2C2_SCL_SION_MASK; + IOMUXC_SW_MUX_CTL_PAD_I2C2_SDA = IOMUXC_SW_MUX_CTL_PAD_I2C2_SDA_MUX_MODE(0) | + IOMUXC_SW_MUX_CTL_PAD_I2C2_SDA_SION_MASK; + + IOMUXC_I2C2_SCL_SELECT_INPUT = IOMUXC_I2C2_SCL_SELECT_INPUT_DAISY(1); + IOMUXC_I2C2_SDA_SELECT_INPUT = IOMUXC_I2C2_SDA_SELECT_INPUT_DAISY(1); + + IOMUXC_SW_PAD_CTL_PAD_I2C2_SCL = IOMUXC_SW_PAD_CTL_PAD_I2C2_SCL_PE_MASK | + IOMUXC_SW_PAD_CTL_PAD_I2C2_SCL_PS(3) | + IOMUXC_SW_PAD_CTL_PAD_I2C2_SCL_DSE(0) | + IOMUXC_SW_PAD_CTL_PAD_I2C2_SCL_HYS_MASK; + + IOMUXC_SW_PAD_CTL_PAD_I2C2_SDA = IOMUXC_SW_PAD_CTL_PAD_I2C2_SDA_PE_MASK | + IOMUXC_SW_PAD_CTL_PAD_I2C2_SDA_PS(3) | + IOMUXC_SW_PAD_CTL_PAD_I2C2_SDA_DSE(0) | + IOMUXC_SW_PAD_CTL_PAD_I2C2_SDA_HYS_MASK; + break; + case I2C3_BASE: + // I2C3 iomux configuration + IOMUXC_SW_MUX_CTL_PAD_I2C3_SCL = IOMUXC_SW_MUX_CTL_PAD_I2C3_SCL_MUX_MODE(0) | + IOMUXC_SW_MUX_CTL_PAD_I2C3_SCL_SION_MASK; + IOMUXC_SW_MUX_CTL_PAD_I2C3_SDA = IOMUXC_SW_MUX_CTL_PAD_I2C3_SDA_MUX_MODE(0) | + IOMUXC_SW_MUX_CTL_PAD_I2C3_SDA_SION_MASK; + + IOMUXC_I2C3_SCL_SELECT_INPUT = IOMUXC_I2C3_SCL_SELECT_INPUT_DAISY(2); + IOMUXC_I2C3_SDA_SELECT_INPUT = IOMUXC_I2C3_SDA_SELECT_INPUT_DAISY(2); + + IOMUXC_SW_PAD_CTL_PAD_I2C3_SCL = IOMUXC_SW_PAD_CTL_PAD_I2C3_SCL_PE_MASK | + IOMUXC_SW_PAD_CTL_PAD_I2C3_SCL_PS(3) | + IOMUXC_SW_PAD_CTL_PAD_I2C3_SCL_DSE(0) | + IOMUXC_SW_PAD_CTL_PAD_I2C3_SCL_HYS_MASK; + + IOMUXC_SW_PAD_CTL_PAD_I2C3_SDA = IOMUXC_SW_PAD_CTL_PAD_I2C3_SDA_PE_MASK | + IOMUXC_SW_PAD_CTL_PAD_I2C3_SDA_PS(3) | + IOMUXC_SW_PAD_CTL_PAD_I2C3_SDA_DSE(0) | + IOMUXC_SW_PAD_CTL_PAD_I2C3_SDA_HYS_MASK; + break; + case I2C4_BASE: + // I2C4 iomux configuration + IOMUXC_SW_MUX_CTL_PAD_SAI1_RX_SYNC = IOMUXC_SW_MUX_CTL_PAD_SAI1_RX_SYNC_MUX_MODE(3) | + IOMUXC_SW_MUX_CTL_PAD_SAI1_RX_SYNC_SION_MASK; + IOMUXC_SW_MUX_CTL_PAD_SAI1_RX_BCLK = IOMUXC_SW_MUX_CTL_PAD_SAI1_RX_BCLK_MUX_MODE(3) | + IOMUXC_SW_MUX_CTL_PAD_SAI1_RX_BCLK_SION_MASK; + + IOMUXC_I2C4_SCL_SELECT_INPUT = IOMUXC_I2C4_SCL_SELECT_INPUT_DAISY(3); + IOMUXC_I2C4_SDA_SELECT_INPUT = IOMUXC_I2C4_SDA_SELECT_INPUT_DAISY(3); + + IOMUXC_SW_PAD_CTL_PAD_SAI1_RX_SYNC = IOMUXC_SW_PAD_CTL_PAD_SAI1_RX_SYNC_PE_MASK | + IOMUXC_SW_PAD_CTL_PAD_SAI1_RX_SYNC_PS(3) | + IOMUXC_SW_PAD_CTL_PAD_SAI1_RX_SYNC_DSE(0) | + IOMUXC_SW_PAD_CTL_PAD_SAI1_RX_SYNC_HYS_MASK; + + IOMUXC_SW_MUX_CTL_PAD_SAI1_RX_BCLK = IOMUXC_SW_PAD_CTL_PAD_SAI1_RX_BCLK_PE_MASK | + IOMUXC_SW_PAD_CTL_PAD_SAI1_RX_BCLK_PS(3) | + IOMUXC_SW_PAD_CTL_PAD_SAI1_RX_BCLK_DSE(0) | + IOMUXC_SW_PAD_CTL_PAD_SAI1_RX_BCLK_HYS_MASK; + break; + default: + break; + } +} + +void configure_uart_pins(UART_Type* base) +{ + switch((uint32_t)base) + { + case UART2_BASE: + // UART2 iomux configuration + IOMUXC_SW_MUX_CTL_PAD_UART2_RX_DATA = IOMUXC_SW_MUX_CTL_PAD_UART2_RX_DATA_MUX_MODE(0); + IOMUXC_SW_MUX_CTL_PAD_UART2_TX_DATA = IOMUXC_SW_MUX_CTL_PAD_UART2_TX_DATA_MUX_MODE(0); + IOMUXC_SW_PAD_CTL_PAD_UART2_RX_DATA = IOMUXC_SW_PAD_CTL_PAD_UART2_RX_DATA_PE_MASK | + IOMUXC_SW_PAD_CTL_PAD_UART2_RX_DATA_PS(3) | + IOMUXC_SW_PAD_CTL_PAD_UART2_RX_DATA_HYS_MASK | + IOMUXC_SW_PAD_CTL_PAD_UART2_RX_DATA_DSE(0); + IOMUXC_SW_PAD_CTL_PAD_UART2_TX_DATA = IOMUXC_SW_PAD_CTL_PAD_UART2_TX_DATA_PE_MASK | + IOMUXC_SW_PAD_CTL_PAD_UART2_TX_DATA_PS(3) | + IOMUXC_SW_PAD_CTL_PAD_UART2_RX_DATA_HYS_MASK | + IOMUXC_SW_PAD_CTL_PAD_UART2_TX_DATA_DSE(0); + IOMUXC_UART2_RX_DATA_SELECT_INPUT = IOMUXC_UART2_RX_DATA_SELECT_INPUT_DAISY(2); + break; + default: + break; + } +} + +/******************************************************************************* + * EOF + ******************************************************************************/ diff --git a/examples/imx7_colibri_m4/pin_mux.h b/examples/imx7_colibri_m4/pin_mux.h new file mode 100644 index 0000000..42eba6b --- /dev/null +++ b/examples/imx7_colibri_m4/pin_mux.h @@ -0,0 +1,94 @@ +/* + * 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. + */ + +/*! +** @addtogroup pin_mux_module pin_mux module documentation +** @{ +*/ + +#ifndef __PIN_MUX__ +#define __PIN_MUX__ + +/* MODULE pin_mux. */ + +#include "device_imx.h" + +/* +** =================================================================== +** Method : pin_mux_CAN (component PinSettings) +*/ +/*! +** @brief +** CAN method sets registers according routing +** settings. Call this method code to route desired pins into: +** CAN1, CAN2 +** peripherals. +** @param +** CAN_Type* base - CAN base address 1..2 +*/ +/* ===================================================================*/ +void configure_flexcan_pins(CAN_Type* base); + +/* +** =================================================================== +** Method : pin_mux_I2C (component PinSettings) +*/ +/*! +** @brief +** I2C method sets registers according routing settings. Call +** this method code to route desired pins into: +** I2C1, I2C2, I2C3, I2C4 +** peripherals. +** @param +** I2C_Type* base - I2C base address 1..4 +*/ +/* ===================================================================*/ +void configure_i2c_pins(I2C_Type* base); + +/* +** =================================================================== +** Method : pin_mux_UART (component PinSettings) +*/ +/*! +** @brief +** UART method sets registers according routing settings. Call +** this method code to route desired pins into: +** UART1, UART2, UART3, UART4, UART5, UART6, UART7 +** peripherals. +** @param +** UART_Type* base - UART base address 1..7 +*/ +/* ===================================================================*/ +void configure_uart_pins(UART_Type* base); + +#endif /* __PIN_MUX__ */ +/******************************************************************************* + * EOF + ******************************************************************************/ -- cgit v1.2.3