element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Blog MAX32660 Evaluation Kit - side note B: Create a Release Configuration
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Jan Cumps
  • Date Created: 12 Jan 2019 1:01 AM Date Created
  • Views 869 views
  • Likes 2 likes
  • Comments 1 comment
  • smart road
  • rt
  • max32660
  • maxim
Related
Recommended

MAX32660 Evaluation Kit - side note B: Create a Release Configuration

Jan Cumps
Jan Cumps
12 Jan 2019

I'm road testing the  Ultra-Low Power Arm Cortex-M4 Darwin MCU EVM.

In this posts I show how to create a Release configuration for Eclipse.

image

 

I've written before that the Build part of the MAXIM SDK hasn't implemented Eclipse's commonly used CDT builder.

MAXIM uses make. That works perfectly. The steps to create a release version of your firmware are different though.

 

The makefile expects that you define the build goal as "release". Else it will compile all C code with debug info and symbols in the object and executable code.

 

Making a Release make file

 

I created a new file, called Makefile_release, in the project root.

It only contains three lines

 

MAKECMDGOALS=release
include Makefile
MXC_OPTIMIZE_CFLAGS=-Os
LDFLAGS+= -Wl,--gc-sections,--print-memory-usage
CFLAGS+= -ffunction-sections
CFLAGS+= -fdata-sections
# Disable assertion checking for release
PROJ_CFLAGS := $(filter-out -DMXC_ASSERT_ENABLE,$(PROJ_CFLAGS))

 

It sets the make goal, and then calls the original makefile.

This takes care that we can define optimizing options and  don't alter the behaviour of the Debug configuration.

It also sets the optimisation level higher. MAXIM's makefiles set it to -O1, so we override that.

 

Create a Release Configuration in Eclipse

 

You can just copy the Debug configuration and change the makefile.

 

image

 

Then, in that Release configuration, modify the Build command to this:

 

make --makefile=Makefile_release ECLIPSE=1

 

image

You can now clean the project and build the Release configuration.

The flags related to debug will be skipped by the make script.

 

Here's the resulting comman line for gcc:

 

arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wa,-mimplicit-it=thumb -Os -fsingle-precision-constant -ffunction-sections -fdata-sections -MD -Wall -Wdouble-promotion -Wno-format -c -fno-isolate-erroneous-paths-dereference -DTARGET=32660 -DTARGET_REV=0x4131 -DMXC_ASSERT_ENABLE -DRO_FREQ=80000000 -I. -ID:/Maxim/Firmware/MAX32660/Libraries/Boards/EvKit_V1/Include -ID:/Maxim/Firmware/MAX32660/Libraries/Boards/EvKit_V1/../Include -ID:/Maxim/Firmware/MAX32660/Libraries/MAX32660PeriphDriver/Include -ID:/Maxim/Firmware/MAX32660/Libraries/CMSIS/Device/Maxim/MAX32660/Include -ID:/Maxim/Firmware/MAX32660/Libraries/CMSIS/Include -o /d/users/jancu/workspace_eclipse_maxim/GPIO/build/main.o main.c

 

I believe you can also do this without an additional make file, by directly defining the MAKECMDGOALS value in the command line of make.

Anyway, this is how I did it, and it works. Critique is welcome.

 

part 1: IDE install and Build First Example
part 2: Mod the PCB for Power Measurement
part 3: Power Measurement
part 4a: Low Power Sensor design - Barometer Hardware
part 4b: Low Power Sensor design - Barometer i2c and Init
part 4c: Low Power Sensor design - Barometer, Not Yet Power Optimised
MAX32660 Evaluation Kit - part 5: FreeRTOS Example
side note A: C++ Eclipse Project
side note B: Create a Release Configuration
  • Sign in to reply
  • Jan Cumps
    Jan Cumps over 6 years ago

    I updated the make script to remove asserts when in release mode, and to print the memory map (related to this post: https://www.element14.com/community/roadTests/2005/l/ultra-low-power-arm-cortex-m4-darwin-mcu-evm#comment-147387 )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube