Home Download
Download
Up

Examples

Complete example projects in Eclipse for various processors. All basic files - makefile, linker script, startup, vector table - can be found inside the projects. Also predefined debugging shortcuts (External Tool and Debug Configuration) are available. In the code, beside blinking the LED, there are some basic system initialization routines - enabling all Flash accelerators and configuring the PLL to achieve max core speed. In the doc/ folder the projects include complete Doxygen generated documentation, which makes it easier to modify the code for different configurations.

Makefile attached to the examples requires a few GNU Coreutils files (beside make: echo, mkdir, rm, sh) for all features to work fully. Windows installer with those basic files can be found in Download > Programs > Coreutils. Those files are also available in WinAVR toolchain. Without those files it is necessary to create an output directory in the project tree (default name for that directory can be found in the Makefile in the line OUT_DIR = out ) or to compile directly into the main project's directory (output directory should be configured as - OUT_DIR = ).

 

lpc1114_blink_led (677.22 kB) hot
Example project for NXP LPC1114. In the code, beside blinking the LED, there are some basic system initialization routines - configuration of flash access time and enabling PLL for max speed (50MHz).
lpc1769_blink_led (907.42 kB) hot
Example project for NXP LPC1769. In the code, beside blinking the LED, there are some basic system initialization routines - configuration of flash access time, enabling PLL for max speed (120MHz) and setting PCLK ratios to 1:1 with the core clock. This example, just as the one for STM32F4, is configured for linaro toolchain, but this time it is not mandatory.
lpc2103_blink_led (189.11 kB) hot

Example project for NXP LPC2103. In the code, beside blinking the LED, there are some basic system initialization routines - enabling of Fast GPIO, MAM and enabling PLL for max speed (72MHz).

lpc4330_blink_led (764.19 kB) hot

Example project for NXP LPC4330, configured for LPC4330-Xplorer evaluation board. In the code, beside blinking the LED with editable speed, there are some basic system initialization routines - enabling of floating point coprocessor (FPU) and enabling PLL for max speed (204MHz). This example requires linaro toolchain (or bleeding-edge-toolchain), because CodeSourcery's toolchain lacks libraries that support floating point coprocessor. You' will also need development version of OpenOCD, any of 0.7.0-dev, as previous versions - including "stable" 0.6.1 - don't support SPIFI memory interface of this chip. It is also worth noting, that debugging this chip is troublesome - the best approach for now is to flash the chip directly with OpenOCD (separate shortcut provided), reset the chip "by hand", start "normal" OpenOCD session and start debugging with "debug" shortcut - the "load + debug" shortcut is included "pro forma", as currently it does not work correctly.

Whole project is also available in GIT repository.

stm32_blink_led (1.67 MB) hot

Example project for ST STM32F103RB. In the code, beside blinking the LED with editable speed, there are some basic system initialization routines - enabling of all GPIO ports, configuraton of Flash latency and enabling PLL for max speed (72MHz).

stm32cl_blink_led (1.68 MB) hot

Example project for ST STM32F107VB. In the code, beside blinking the LED with editable speed, there are some basic system initialization routines - enabling of all GPIO ports, configuraton of Flash latency and enabling PLLs for max speed (72MHz).

stm32f4_blink_led (2.02 MB) hot
Example project for ST STM32F407VG, configured for STM32F4DISCOVERY evaluation board. In the code, beside blinking the LED with editable speed, there are some basic system initialization routines - enabling of floating point coprocessor (FPU), all GPIO ports, configuraton of Flash latency and enabling PLL for max speed (168MHz). This example requires linaro toolchain, because CodeSourcery's toolchain lacks libraries that support floating point coprocessor. Because the board which is used has embedded ST-LINK/V2 JTAG, you need development version of OpenOCD for debugging, from these available on this site in the neighboring category - at least from February 2012 (OpenOCD 0.6.0-dev-120229143915 / 0.6.0-dev-00448-gc59a441 or 64-bit version), previous versions - including "stable" 0.5.0 - don't support this JTAG.
Display Num 

 

Powered by Phoca Download