Giter Site home page Giter Site logo

furtnerthomas / linux-xmc-development Goto Github PK

View Code? Open in Web Editor NEW
16.0 5.0 0.0 8.66 MB

GNU toolchain for Infineon XMC Microcontroller software development

Home Page: https://www.infineon.com/xmc

License: Other

Makefile 0.05% Shell 0.15% M4 0.01% Assembly 0.56% C 96.61% C++ 2.57% Groovy 0.01% CSS 0.01% PHP 0.02% JavaScript 0.01% HTML 0.01% Objective-C 0.01%
xmc infineon make automake infineon-xmc-microcontroller linux ubuntu

linux-xmc-development's Introduction

Linux-XMC-Development

GNU toolchain for Infineon XMC Microcontroller software development

GitHub Logo

GitHub Logo

Automake initialization of new XMC project

Most of the following explanations how to create a new automake project is perfectly explained on http://mij.oltrelinux.com/devel/autoconf-automake/

Initialization

To create a new automake project, two config files and the src directory are necessary:

  • configure.ac
  • Makefile.am
  • src/

Generate project

Please execute the following commands in order to use automake to create a makefile

> aclocal
> autoconf
> automake 

Compile and link

The following command must be executed only to reconfigure the Makefile after the source directory structure has changed.

./configure

If there are only changes to the source files, it's sufficient to execute

make

Install tools

In order to flash, debug and run the program on our XMC4500 µController we have to install eclipse and some addtitional packages.

npm install --global xpm@latest
xpm install --global @xpack-dev-tools/arm-none-eabi-gcc@latest
  • Download and Install Eclipse
  • Install CDT feature
  • Open pack manager in eclipse and refresh pack list
  • Install pack for XMC4500

The arm gdb debugger is used and selected in eclipse in the Debugger tab. The eclipse textbox shows
${cross_prefix}gdb${cross_suffix}
which is expanded to
arm-none-eabi-gdb

Install SEGGER J-Link Driver
https://www.segger.com/downloads/jlink/#J-LinkSoftwareAndDocumentationPack

Create debug configuration

Open project properties and select XMC4500-F100x1024 device

GitHub Logo

Click on Apply and Close

Open debug configurations
Create new GDB SEGGER J-Link Debugging configuration

GitHub Logo

GitHub Logo

Make sure that Device name is XMC4500-1024

Blinky application

The blinky application code was originally shown in the following tutorial: https://embeddedplaygroup.wordpress.com/2012/12/12/its-relax-time-blinky-led/

Makefile.am

INCLUDE_DIRS    = -Isrc/include
ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS       = $(INCLUDE_DIRS) -std=c99 -Wall -O0 -g  \
                                  -DXMC4500_F100x1024 \
                                  -mthumb \
                                  -march=armv7-m \
                                  --specs=nosys.specs \
                                  -Wl,--gc-sections

CFLAGS = -g -O0

CC              = arm-none-eabi-gcc
CCAS            = arm-none-eabi-gcc
AM_LDFLAGS      = -g -O0 -Tsrc/linker_script.ld


bin_PROGRAMS = main.bin

main_bin_SOURCES =  src/Startup/system_XMC4500.c \
                    src/Startup/startup_XMC4500.S \
                    src/main.c

Reference for symbols in Makefile.am file: https://www.gnu.org/software/automake/manual/html_node/Program-Variables.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.