-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Implement second core on LPC54114 #7161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b4823f5
25caaaf
f9d9bce
0394328
b0bad56
cf80d08
37e1786
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Kconfig - NXP LPC54114 M0 platform configuration options | ||
|
||
# | ||
# Copyright (c) 2017, NXP | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
if SOC_LPC54114_M0 | ||
|
||
config SOC | ||
string | ||
default lpc54114_m0 | ||
|
||
config CPU_CORTEX_M_HAS_VTOR | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be a select under config SOC_LPC54114_M0 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
def_bool y | ||
|
||
if PINMUX | ||
|
||
config PINMUX_MCUX_LPC | ||
def_bool n | ||
|
||
endif # PINMUX | ||
|
||
config GPIO | ||
def_bool n | ||
|
||
if GPIO | ||
|
||
config GPIO_MCUX_LPC | ||
def_bool n | ||
|
||
endif # GPIO | ||
|
||
if SERIAL | ||
|
||
config USART_MCUX_LPC | ||
def_bool n | ||
|
||
endif # SERIAL | ||
|
||
endif # SOC_LPC54114_M0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,19 @@ | |
|
||
/* SoC level DTS fixup file */ | ||
|
||
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do this as:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, changed. |
||
#if defined(CONFIG_SOC_LPC54114_M0) | ||
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V6M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS | ||
#else | ||
#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS | ||
#endif | ||
|
||
#define CONFIG_USART_MCUX_LPC_0_BASE_ADDRESS NXP_LPC_USART_40086000_BASE_ADDRESS | ||
#define CONFIG_USART_MCUX_LPC_0_BAUD_RATE NXP_LPC_USART_40086000_CURRENT_SPEED | ||
#define CONFIG_USART_MCUX_LPC_0_IRQ_PRI NXP_LPC_USART_40086000_IRQ_0_PRIORITY | ||
#define CONFIG_USART_MCUX_LPC_0_NAME NXP_LPC_USART_40086000_LABEL | ||
|
||
#define CONFIG_MAILBOX_MCUX_MAILBOX_0_IRQ NXP_LPC_MAILBOX_4008B000_IRQ_0 | ||
#define CONFIG_MAILBOX_MCUX_MAILBOX_0_IRQ_PRI NXP_LPC_MAILBOX_4008B000_IRQ_0_PRIORITY | ||
#define CONFIG_MAILBOX_MCUX_MAILBOX_0_NAME NXP_LPC_MAILBOX_4008B000_LABEL | ||
|
||
/* End of SoC Level DTS fixup file */ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,23 @@ | |
|
||
#include <autoconf.h> | ||
|
||
/* Specify the memory areas */ | ||
MEMORY | ||
{ | ||
m_core1_image (RX) : ORIGIN = 0x00030000, LENGTH = 0x00010000 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can these values come from dts? |
||
} | ||
|
||
/* Define output sections */ | ||
SECTIONS | ||
{ | ||
/* section for storing the secondary core image */ | ||
.m0code : | ||
{ | ||
. = ALIGN(4) ; | ||
KEEP (*(.m0code)) | ||
*(.m0code*) | ||
. = ALIGN(4) ; | ||
} > m_core1_image | ||
} | ||
|
||
#include <arch/arm/cortex_m/scripts/linker.ld> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,17 @@ extern "C" { | |
#include <device.h> | ||
#include <misc/util.h> | ||
#include <fsl_common.h> | ||
|
||
/* Address of RAM, where the image for core1 should be copied */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The addresses seem like the should be board specific. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The address should be shared by two boards in fact: the M4 version and M0 version. But these are separate boards in Zephyr now, so unfortunately there will stay some sort of duplication. But for sure it can be done at least better than now. |
||
#define CORE1_BOOT_ADDRESS ((void *)0x20010000) | ||
extern const char m0_image_start[]; | ||
extern const char *m0_image_end; | ||
extern int m0_image_size; | ||
#define CORE1_IMAGE_START ((void *)m0_image_start) | ||
#define CORE1_IMAGE_SIZE (m0_image_size) | ||
|
||
|
||
|
||
#endif /* !_ASMLANGUAGE */ | ||
|
||
#ifdef __cplusplus | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,17 +14,40 @@ | |
|
||
aliases{ | ||
usart-0 = &usart0; | ||
mailbox-0 = &mailbox0; | ||
led0 = &red_led; | ||
led1 = &green_led; | ||
led2 = &blue_led; | ||
}; | ||
|
||
chosen { | ||
zephyr,sram = &sram1; | ||
zephyr,sram = &sram0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add a comment in commit message about this change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, modified commit message. |
||
zephyr,flash = &flash0; | ||
zephyr,console = &usart0; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
red_led: led@0 { | ||
gpios = <&gpio0 29 GPIO_INT_ACTIVE_LOW>; | ||
label = "User LD1"; | ||
}; | ||
green_led: led@1 { | ||
gpios = <&gpio1 10 GPIO_INT_ACTIVE_LOW>; | ||
label = "User LD2"; | ||
}; | ||
blue_led: led@2 { | ||
gpios = <&gpio1 9 GPIO_INT_ACTIVE_LOW>; | ||
label = "User LD3"; | ||
}; | ||
}; | ||
}; | ||
|
||
&usart0 { | ||
status = "ok"; | ||
current-speed = <115200>; | ||
}; | ||
|
||
&mailbox0 { | ||
status = "ok"; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# | ||
# Copyright (c) 2017, NXP | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
if(CONFIG_PINMUX_MCUX_LPC) | ||
zephyr_library() | ||
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers) | ||
zephyr_library_sources(pinmux.c) | ||
endif() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Kconfig - LPCXpresso54114 board | ||
# | ||
# Copyright (c) 2017, NXP | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
config BOARD_LPCXPRESSO54114_M0 | ||
bool "NXP LPCXPRESSO-54114 M0" | ||
depends on SOC_SERIES_LPC54XXX | ||
select SOC_PART_NUMBER_LPC54114J256BD64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some help text, here, would be very nice, since this will be a generic Cortex-M K-option (even though the option is self-descriptive)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a simple help text.