Skip to content

Commit 41e615d

Browse files
committed
add make build for maxim
1 parent 1be7b8f commit 41e615d

File tree

21 files changed

+224
-29
lines changed

21 files changed

+224
-29
lines changed

examples/build_system/make/make.mk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# Common make definition for all examples
33
# ---------------------------------------
44

5+
# upper helper function
6+
to_upper = $(subst a,A,$(subst b,B,$(subst c,C,$(subst d,D,$(subst e,E,$(subst f,F,$(subst g,G,$(subst h,H,$(subst i,I,$(subst j,J,$(subst k,K,$(subst l,L,$(subst m,M,$(subst n,N,$(subst o,O,$(subst p,P,$(subst q,Q,$(subst r,R,$(subst s,S,$(subst t,T,$(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,$(subst z,Z,$(subst -,_,$(1))))))))))))))))))))))))))))
7+
58
#-------------------------------------------------------------
69
# Toolchain
710
# Can be changed via TOOLCHAIN=gcc|iar or CC=arm-none-eabi-gcc|iccarm|clang
@@ -109,7 +112,7 @@ INC += \
109112
$(TOP)/$(FAMILY_PATH) \
110113
$(TOP)/src \
111114

112-
BOARD_UPPER = $(subst a,A,$(subst b,B,$(subst c,C,$(subst d,D,$(subst e,E,$(subst f,F,$(subst g,G,$(subst h,H,$(subst i,I,$(subst j,J,$(subst k,K,$(subst l,L,$(subst m,M,$(subst n,N,$(subst o,O,$(subst p,P,$(subst q,Q,$(subst r,R,$(subst s,S,$(subst t,T,$(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,$(subst z,Z,$(subst -,_,$(BOARD))))))))))))))))))))))))))))
115+
BOARD_UPPER = $(call to_upper,$(BOARD))
113116
CFLAGS += -DBOARD_$(BOARD_UPPER)
114117

115118
ifdef CFLAGS_CLI

hw/bsp/family_support.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ if (NOT DEFINED TOOLCHAIN)
3838
set(TOOLCHAIN gcc)
3939
endif ()
4040

41+
# Optimization
42+
if (NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
43+
set(CMAKE_BUILD_TYPE MinSizeRel CACHE STRING "Build type" FORCE)
44+
endif ()
45+
4146
#-------------------------------------------------------------
4247
# FAMILY and BOARD
4348
#-------------------------------------------------------------

hw/bsp/maxim/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ compatible debug probe. However, at the time of writing, the necessary flashing
3939
algorithms for OpenOCD have not yet been incorporated into the OpenOCD master
4040
branch. To utilize the provided debug probes, please install the bundled MSDK
4141
package which includes the appropriate OpenOCD modifications. To leverage this
42-
OpenOCD instance, run the `<target>-openocd` CMake
42+
OpenOCD instance, run the `flash-msdk` Makefile rule, or `<target>-openocd` CMake
4343
target.

hw/bsp/maxim/boards/apard32690/board.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
#ifndef BOARD_H_
3333
#define BOARD_H_
3434

35-
#include "gpio.h"
36-
#include "mxc_sys.h"
35+
#include "max32690.h"
3736

3837
#ifdef __cplusplus
3938
extern "C" {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
MAX_DEVICE = max32690

hw/bsp/maxim/boards/max32650evkit/board.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
#ifndef BOARD_H_
3333
#define BOARD_H_
3434

35-
#include "gpio.h"
36-
#include "mxc_sys.h"
35+
#include "max32650.h"
3736

3837
#ifdef __cplusplus
3938
extern "C" {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
MAX_DEVICE = max32650

hw/bsp/maxim/boards/max32650fthr/board.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
#ifndef BOARD_H_
3333
#define BOARD_H_
3434

35-
#include "gpio.h"
36-
#include "mxc_sys.h"
35+
#include "max32650.h"
3736

3837
#ifdef __cplusplus
3938
extern "C" {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
MAX_DEVICE = max32650

hw/bsp/maxim/boards/max32651evkit/board.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
#ifndef BOARD_H_
3333
#define BOARD_H_
3434

35-
#include "gpio.h"
36-
#include "mxc_sys.h"
35+
#include "max32650.h"
3736

3837
#ifdef __cplusplus
3938
extern "C" {

0 commit comments

Comments
 (0)