Skip to content

Commit

Permalink
armv8m: Add MCX N94x target, fix armv8m build
Browse files Browse the repository at this point in the history
JIRA: RTOS-881
  • Loading branch information
agkaminski committed Jul 26, 2024
1 parent 8c260ab commit 4d36d57
Show file tree
Hide file tree
Showing 18 changed files with 1,944 additions and 22 deletions.
5 changes: 5 additions & 0 deletions hal/armv8m/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,9 @@ ifneq (, $(findstring nrf, $(TARGET_SUBFAMILY)))
CFLAGS += -Ihal/armv8m
endif

ifneq (, $(findstring mcx, $(TARGET_SUBFAMILY)))
include hal/armv8m/mcx/Makefile
CFLAGS += -Ihal/armv8m
endif

OBJS += $(addprefix $(PREFIX_O)hal/armv8m/, string.o spinlock.o cpu.o hal.o pmap.o exceptions.o _memcpy.o _memset.o)
5 changes: 0 additions & 5 deletions hal/armv8m/arch/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
#ifndef _HAL_ARMV8M_CPU_H_
#define _HAL_ARMV8M_CPU_H_


#if defined(__CPU_NRF9160)
#define CPU_NRF91
#endif

#include "hal/types.h"

#define SIZE_PAGE 0x200
Expand Down
4 changes: 3 additions & 1 deletion hal/armv8m/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,10 @@ char *hal_cpuInfo(char *info)
int i;
unsigned int cpuinfo;

#ifdef CPU_NRF91
#if defined(__CPU_NRF9160)
cpuinfo = _nrf91_cpuid();
#elif defined(__CPU_MCXN94X)
cpuinfo = _mcxn94x_cpuid();
#else
hal_strcpy(info, "unknown");
return info;
Expand Down
12 changes: 12 additions & 0 deletions hal/armv8m/mcx/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# Makefile for Phoenix-RTOS kernel (ARMv8 HAL)
#
# Copyright 2016-2017, 2019-2020, 2022, 2024 Phoenix Systems
#


ifneq (, $(findstring mcxn94x, $(TARGET_SUBFAMILY)))
include hal/armv8m/mcx/n94x/Makefile
endif

OBJS += $(addprefix $(PREFIX_O)hal/armv8m/mcx/, _init.o interrupts.o)
Loading

0 comments on commit 4d36d57

Please sign in to comment.