summaryrefslogtreecommitdiff
path: root/examples
AgeCommit message (Collapse)Author
2019-02-06Fix UART examples for Colibri iMX7colibri-imx7-m4-freertos-v8Andy Kiser
The uart_polling and uart_interrupt examples were originally written for a UART used in DCE mode. The Colibri iMX7 is designed to use the UART in DTE mode. The signals are swapped between DTE and DCE (Rx <-> Tx, and control signals). In order to use the correct pin direction, the bit DCEDTE in the UARTx_UFCR register needs to be configured accordingly. Signed-off-by: Andy Kiser <andy.kiser@gmx.ch>
2018-08-30use -Og for debuggingStefan Agner
Currently we use -O0 (no optimization) for debug builds. Unfortunately this leads to large firmwares really quickly, and prevents debugging in TCM/OCRAM. Use -Og which enables some optimization which do not interfere with debugging. GCC manual says: Optimize debugging experience. -Og enables optimizations that do not interfere with debugging. It should be the optimization level of choice for the standard edit-compile-debug cycle, offering a reasonable level of optimization while maintaining fast compilation and a good debugging experience. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2018-05-29fix FlexCAN1 pinmuxingStefan Agner
Make sure the correct alternate mode is choosen and RX pin daisy chaining is taken care of. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2018-05-23switch to FlexCAN instance 1Stefan Agner
Use FlexCAN instance 1 with pinmux ENET1_RD2/ENET1_RD3 as CAN RX/TX. This pads are available at SODIMM 63/55 and are compatible with Colibri iMX6/VFxx. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2018-05-15examples: fix missing gpio_ctrl.h errorsStefan Agner
Not all example provide a gpio_ctrl.h header file. Do not include it from the base gpio_ctrl.h header file. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-29examples: gpio_freertos: example with gpio, FreeRTOS and rpmsgRaul Munoz
This example control two leds and two buttons and also communicates between M4 and A7 using rpmsg. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-29examples: gpio_bank2_imx: gpio example using just GPIO2Raul Munoz
This example control a led and a button just using GPIOs from the bank 2 (GPIO2). Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-29examples: webinar: Config files to be used in the webinarRaul Munoz
According to the configuration I will use in the webinar, I add this config files to better exaplain gpio usage Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22hello_world_ddr: add RDC memory mappingStefan Agner
Configure RDC memory mapping when running firmware from DDR. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: str_echo_freertos: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: rpmsg_str_echo_bm: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: hello_world_ddr: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: hello_world_ocram: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: rand_wfi: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: sema4_demo: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: wdog_imx: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: adc_imx7d: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: gpt: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: uart_polling: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: uart_interrupt: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: i2c_polling_sensor_imx7d: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: i2c_interrupt_sensor_imx7d: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: flexcan_network: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: flexcan_loopback: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: ecspi_polling_master: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: ecspi_interrupt_master: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: pingpong_bm: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Also changed the linker to OCRAM. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-22examples: pingpong_freertos: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Also changed the linker to OCRAM and remove no-strict-aliasing. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-19examples: gpio_imx: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-19examples: blinking_imx_demo: update CMake structureRaul Munoz
Updating this CMake struct according hello_world example. Using this new struct we can build debug and release configuration at the same time and use Eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-19examples: add eclipse generatorRaul Munoz
Adding Eclipse CDT4 Generator in orther to have the .cproject .project created with cmake command. It help to include the files inside eclipse. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> [add generated Eclipse file to gitignore] Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-16force program header alignment to be smaller than 32kbytesStefan Agner
GCC 5 and newer seem to choose higher alignment values in elf program headers than older versions. This causes issues when doing address translations with areas which have lower alignment: It moves the base address outside of memory base addresse (e.g. TCML memory base address is aligned to 32kiB). With 4K we use a safe and sensible value for alignment. With that all elf program headers are aligned with 0x1000. $ readelf -l debug/hello_world.elf Elf file type is EXEC (Executable file) Entry point 0x1fff8311 There are 3 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x001000 0x1fff8000 0x1fff8000 0x00240 0x00240 R 0x1000 LOAD 0x001240 0x1fff8240 0x1fff8240 0x03904 0x03904 RWE 0x1000 LOAD 0x005000 0x20000000 0x1fffbb44 0x00070 0x059b0 RW 0x1000 Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-16use OCRAM_S for interrupt vectors by defaultStefan Agner
The Cortex-M4 core starts executing at 0x00000000, which is OCRAM_S. So far the bootloader (bootaux) copied the reset vector and the initial stack pointer to that location, however, this does not work well when using debuggers. Also, newer U-Boot support elf loading, which allow to load the reset vector directly to the right location. It also safes some bytes in the area where the firmware is stored. This basically mandantes to use elf files since bin firmware files can not be sparse... Hence disable building bin files by default. Preserve the old linker files with _bin extension in case bin files are still preferred. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-12improve CMakeLists.txtStefan Agner
Unify toolchain flags and use BspRootDirPath and ProjectName variables to improve readability of CMakeLists.txt files. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-12unify linker scriptsStefan Agner
The section definitions of all linker scripts is actually the same, unify them and use INCLUDE. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-12examples: convert CMake structure to allow multiple buildsStefan Agner
Convert CMake build files structure such that we can build debug and release configuration simultaneously. This is useful when using Eclipse's Makefile integration. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Suggested-by: Raul Munoz <raul.munoz@toradex.com>
2017-05-08fix warning of unused variableStefan Agner
Commit acebb1dd18 ("remove SABRE specific standby pin mux") introduced an unused variable which leads to a warning. Remove it. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-05-01remove SABRE specific standby pin muxStefan Agner
The i.MX 7Dual SABRE board uses a GPIO which allows to pu the CAN transceiver into standby mode. This pin is not used on Colibri designs, hence remove the pin mux/GPIO configuration. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-03-24simplify CMake makefileStefan Agner
Deduplicate debug/release variables by moving shared settings into common variables. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-03-24simplify CMake by using BspRootDirPathStefan Agner
Introduce BspRootDirPath to cleanup paths. Also suppress generation of install files since we do cross compilation of firmwares by default. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-02-20spi: example: add SPI exampleRaul Munoz
Add interrupt and polling examples based on the stander colibri SPI (ECSPI3). SODIMM_88 - SPI CLK SODIMM_92 - SPI TXD SODIMM_90 - SPI RXD SODIMM_86 - SPI CS To test this example, connect SODIMM_92 to SODIMM_90 in order to create a loop back. Signed-off-by: Raul Munoz <raul.munoz@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-02-15add defines for Colibri standard SPIStefan Agner
The Colibri standard SPI is connected to the SoCs ECSPI3 instance. Add defines as BOARD_ECSPI_... Also add board level pinmux and clock readout support. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-11-14examples/imx7_colibri_m4: select correct clock for GPTAStefan Agner
GPTA is supposed to run directly of the 24MHz OSC. Fix a type which update GPTB's root clock instead of GPTA. Note: GPTB seems to rely on the System PLL PFD0, which seems to be influenced by Linux' SDHC driver. Freezes of both systems have been observed. Disabling the SDHC driver on the Linux side or using the 24MHz clock source for GPTB seem to avoid freezes. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-11-14examples/imx7_colibri_m4: synchronize with SDBStefan Agner
Synchronize examples with latest versions from the imx7d_sdb_m4 board. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-08-09resync with FreeRTOS_iMX7D_1.0.1 GAColibri_iMX7_M4_FreeRTOS_V1.0.1_20160810Stefan Agner
2016-05-09resync with FreeRTOS_BSP_1.0.1_iMX7DStefan Agner
2016-01-18imx7_colibri_m4: remove QSPI exampleStefan Agner
The Colibri iMX7 module does not provide QSPI flash, hence drop the QSPI example.
2016-01-18imx7_colibri_m4: changed pinmux for I2C4, changed board I2C interface to I2C4Mateusz Majchrzycki
Pin assignment for I2C4 changed to redirect the bus to SODIMM pins 194 and 196 (standard Colibri I2C interface)
2016-01-12examples: imx7_colibri_m4: adopted GPIO exampleStefan Agner
Use Colibri EXT_IO0-2 as Key/LED GPIO. Those signals can easily be connected to a real button/LED on the Colibri Evaluation board: EXT_IO0 => X21-LED1 EXT_IO1 => X21-SW6 EXT_IO2 => X21-SW5
2016-01-12examples: imx7_colibri_m4: renamed board nameStefan Agner