Skip to content

Commit e7a0e52

Browse files
committed
[nrf mergeup] Merge upstream up to commit 19de7ec
Regular upmerge. Signed-off-by: Robert Lubos <[email protected]>
2 parents 578dac8 + 19de7ec commit e7a0e52

File tree

1,036 files changed

+13834
-9960
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,036 files changed

+13834
-9960
lines changed

.shippable.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ compiler: gcc
44

55
env:
66
global:
7-
- SDK=0.9.5
8-
- ZEPHYR_SDK_INSTALL_DIR=/opt/sdk/zephyr-sdk-0.9.5
7+
- SDK=0.10.0
8+
- ZEPHYR_SDK_INSTALL_DIR=/opt/sdk/zephyr-sdk-0.10.0
99
- ZEPHYR_TOOLCHAIN_VARIANT=zephyr
1010
- MATRIX_BUILDS="5"
1111
matrix:
@@ -21,7 +21,7 @@ build:
2121
- ${SHIPPABLE_BUILD_DIR}/ccache
2222
pre_ci_boot:
2323
image_name: zephyrprojectrtos/ci
24-
image_tag: v0.6.1
24+
image_tag: v0.6.3
2525
pull: true
2626
options: "-e HOME=/home/buildslave --privileged=true --tty --net=bridge --user buildslave"
2727

CMakeLists.txt

Lines changed: 83 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,6 @@ endif()
348348

349349
zephyr_cc_option_ifdef(CONFIG_STACK_USAGE -fstack-usage)
350350

351-
zephyr_system_include_directories(${NOSTDINC})
352-
353351
# Force an error when things like SYS_INIT(foo, ...) occur with a missing header.
354352
zephyr_cc_option(-Werror=implicit-int)
355353

@@ -365,7 +363,8 @@ zephyr_cc_option(-Wpointer-arith)
365363
# Declare MPU userspace dependencies before the linker scripts to make
366364
# sure the order of dependencies are met
367365
if(CONFIG_USERSPACE)
368-
set(APP_SMEM_DEP app_smem_linker)
366+
set(APP_SMEM_ALIGNED_DEP app_smem_aligned_linker)
367+
set(APP_SMEM_UNALIGNED_DEP app_smem_unaligned_linker)
369368
if(CONFIG_ARM)
370369
set(PRIV_STACK_DEP priv_stacks_prebuilt)
371370
endif()
@@ -385,6 +384,13 @@ zephyr_ld_options(
385384
${LINKERFLAGPREFIX},--build-id=none
386385
)
387386

387+
# Sort the common symbols and each input section by alignment
388+
# in descending order to minimize padding between these symbols.
389+
zephyr_ld_options(
390+
${LINKERFLAGPREFIX},--sort-common=descending
391+
${LINKERFLAGPREFIX},--sort-section=alignment
392+
)
393+
388394
get_property(TOPT GLOBAL PROPERTY TOPT)
389395
set_ifndef( TOPT -T)
390396

@@ -448,6 +454,8 @@ function(construct_add_custom_command_for_linker_pass linker_output_name output_
448454

449455
if (${linker_output_name} MATCHES "^linker_pass_final$")
450456
set(linker_pass_define -DLINKER_PASS2)
457+
elseif (${linker_output_name} MATCHES "^linker_app_smem_unaligned$")
458+
set(linker_pass_define -DLINKER_APP_SMEM_UNALIGNED)
451459
else()
452460
set(linker_pass_define "")
453461
endif()
@@ -763,7 +771,7 @@ construct_add_custom_command_for_linker_pass(
763771
custom_command
764772
${ALIGN_SIZING_DEP}
765773
${PRIV_STACK_DEP}
766-
${APP_SMEM_DEP}
774+
${APP_SMEM_ALIGNED_DEP}
767775
${CODE_RELOCATION_DEP}
768776
${OFFSETS_H_TARGET}
769777
)
@@ -1133,17 +1141,32 @@ configure_file(
11331141
${PROJECT_BINARY_DIR}/include/generated/app_data_alignment.ld)
11341142

11351143
configure_file(
1136-
$ENV{ZEPHYR_BASE}/include/arch/arm/cortex_m/scripts/app_smem.ld
1144+
$ENV{ZEPHYR_BASE}/include/linker/app_smem.ld
11371145
${PROJECT_BINARY_DIR}/include/generated/app_smem.ld)
11381146

1147+
configure_file(
1148+
$ENV{ZEPHYR_BASE}/include/linker/app_smem_aligned.ld
1149+
${PROJECT_BINARY_DIR}/include/generated/app_smem_aligned.ld)
1150+
1151+
configure_file(
1152+
$ENV{ZEPHYR_BASE}/include/linker/app_smem_unaligned.ld
1153+
${PROJECT_BINARY_DIR}/include/generated/app_smem_unaligned.ld)
1154+
11391155
if(CONFIG_USERSPACE)
1140-
set(APP_SMEM_LD "${PROJECT_BINARY_DIR}/include/generated/app_smem.ld")
1156+
set(APP_SMEM_ALIGNED_LD "${PROJECT_BINARY_DIR}/include/generated/app_smem_aligned.ld")
1157+
set(APP_SMEM_UNALIGNED_LD "${PROJECT_BINARY_DIR}/include/generated/app_smem_unaligned.ld")
11411158
set(OBJ_FILE_DIR "${PROJECT_BINARY_DIR}/../")
11421159

11431160
add_custom_target(
1144-
${APP_SMEM_DEP}
1161+
${APP_SMEM_ALIGNED_DEP}
1162+
DEPENDS
1163+
${APP_SMEM_ALIGNED_LD}
1164+
)
1165+
1166+
add_custom_target(
1167+
${APP_SMEM_UNALIGNED_DEP}
11451168
DEPENDS
1146-
${APP_SMEM_LD}
1169+
${APP_SMEM_UNALIGNED_LD}
11471170
)
11481171

11491172
if(CONFIG_NEWLIB_LIBC)
@@ -1154,18 +1177,65 @@ if(CONFIG_USERSPACE)
11541177
endif()
11551178

11561179
add_custom_command(
1157-
OUTPUT ${APP_SMEM_LD}
1180+
OUTPUT ${APP_SMEM_UNALIGNED_LD}
11581181
COMMAND ${PYTHON_EXECUTABLE}
11591182
${ZEPHYR_BASE}/scripts/gen_app_partitions.py
11601183
-d ${OBJ_FILE_DIR}
1161-
-o ${APP_SMEM_LD}
1184+
-o ${APP_SMEM_UNALIGNED_LD}
1185+
${NEWLIB_PART} ${MBEDTLS_PART}
1186+
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
1187+
DEPENDS
1188+
kernel
1189+
${ZEPHYR_LIBS_PROPERTY}
1190+
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/
1191+
COMMENT "Generating app_smem_unaligned linker section"
1192+
)
1193+
1194+
construct_add_custom_command_for_linker_pass(
1195+
linker_app_smem_unaligned
1196+
custom_command
1197+
${ALIGN_SIZING_DEP}
1198+
${CODE_RELOCATION_DEP}
1199+
${APP_SMEM_UNALIGNED_DEP}
1200+
${APP_SMEM_UNALIGNED_LD}
1201+
${OFFSETS_H_TARGET}
1202+
)
1203+
add_custom_command(
1204+
${custom_command}
1205+
)
1206+
1207+
add_custom_target(
1208+
linker_app_smem_unaligned_script
1209+
DEPENDS
1210+
linker_app_smem_unaligned.cmd
1211+
)
1212+
1213+
set_property(TARGET
1214+
linker_app_smem_unaligned_script
1215+
PROPERTY INCLUDE_DIRECTORIES
1216+
${ZEPHYR_INCLUDE_DIRS}
1217+
)
1218+
1219+
set(APP_SMEM_UNALIGNED_LIB app_smem_unaligned_output_obj_renamed_lib)
1220+
add_executable( app_smem_unaligned_prebuilt misc/empty_file.c)
1221+
target_link_libraries(app_smem_unaligned_prebuilt ${TOPT} ${PROJECT_BINARY_DIR}/linker_app_smem_unaligned.cmd ${zephyr_lnk} ${CODE_RELOCATION_DEP})
1222+
set_property(TARGET app_smem_unaligned_prebuilt PROPERTY LINK_DEPENDS ${PROJECT_BINARY_DIR}/linker_app_smem_unaligned.cmd)
1223+
add_dependencies( app_smem_unaligned_prebuilt ${ALIGN_SIZING_DEP} linker_app_smem_unaligned_script ${OFFSETS_LIB})
1224+
1225+
add_custom_command(
1226+
OUTPUT ${APP_SMEM_ALIGNED_LD}
1227+
COMMAND ${PYTHON_EXECUTABLE}
1228+
${ZEPHYR_BASE}/scripts/gen_app_partitions.py
1229+
-e $<TARGET_FILE:app_smem_unaligned_prebuilt>
1230+
-o ${APP_SMEM_ALIGNED_LD}
11621231
${NEWLIB_PART} ${MBEDTLS_PART}
11631232
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
11641233
DEPENDS
11651234
kernel
11661235
${ZEPHYR_LIBS_PROPERTY}
1236+
app_smem_unaligned_prebuilt
11671237
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/
1168-
COMMENT "Generating app_smem linker section"
1238+
COMMENT "Generating app_smem_aligned linker section"
11691239
)
11701240
endif()
11711241

@@ -1175,8 +1245,8 @@ if(CONFIG_USERSPACE AND CONFIG_ARM)
11751245
custom_command
11761246
${ALIGN_SIZING_DEP}
11771247
${CODE_RELOCATION_DEP}
1178-
${APP_SMEM_DEP}
1179-
${APP_SMEM_LD}
1248+
${APP_SMEM_ALIGNED_DEP}
1249+
${APP_SMEM_ALIGNED_LD}
11801250
${OFFSETS_H_TARGET}
11811251
)
11821252
add_custom_command(

CODEOWNERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
/boards/nios2/altera_max10/ @ramakrishnapallala
7777
/boards/posix/ @aescolar
7878
/boards/riscv32/ @kgugala @pgielda @nategraff-sifive
79+
/boards/shields/ @erwango
7980
/boards/x86/ @andrewboie @nashif
8081
/boards/x86/arduino_101/ @nashif
8182
/boards/x86/galileo/ @nashif
@@ -134,9 +135,13 @@
134135
/drivers/wifi/eswifi/ @loicpoulain
135136
/dts/arm/st/ @erwango
136137
/dts/arm/nordic/ @ioannisg @carlescufi
138+
/dts/arm/nxp/ @MaureenHelm
137139
/dts/bindings/can/ @alexanderwachter
140+
/dts/bindings/*/nordic* @anangl
141+
/dts/bindings/*/nxp* @MaureenHelm
138142
/ext/fs/ @nashif @ramakrishnapallala
139143
/ext/hal/cmsis/ @MaureenHelm @galak
144+
/ext/hal/libmetal/ @galak
140145
/ext/hal/nordic/ @carlescufi @anangl
141146
/ext/hal/nxp/ @MaureenHelm
142147
/ext/hal/qmsi/ @nashif
@@ -181,6 +186,7 @@
181186
/include/kernel_version.h @andrewboie @andyross
182187
/include/led.h @Mani-Sadhasivam
183188
/include/led_strip.h @mbolivar
189+
/include/linker/app_smem*.ld @andrewboie
184190
/include/linker/linker-defs.h @andrewboie @andyross
185191
/include/linker/linker-tool-gcc.h @andrewboie @andyross
186192
/include/linker/linker-tool.h @andrewboie @andyross
@@ -207,6 +213,7 @@
207213
/lib/posix/ @pfalcon
208214
/kernel/device.c @andrewboie @andyross @nashif
209215
/kernel/idle.c @andrewboie @andyross @nashif
216+
/samples/basic/servo_motor/*microbit* @jhe
210217
/samples/bluetooth/ @sjanc @jhedberg @Vudentz
211218
/samples/boards/intel_s1000_crb/ @sathishkuttan @rgundi @nashif
212219
/samples/display/ @vanwinkeljan
@@ -236,6 +243,7 @@
236243
/scripts/process_gperf.py @andrewboie
237244
/scripts/sanity_chk/ @andrewboie @nashif
238245
/scripts/sanitycheck @andrewboie @nashif
246+
/scripts/series-push-hook.sh @erwango
239247
/scripts/west_commands/ @mbolivar
240248
/scripts/west-commands.yml @mbolivar
241249
/subsys/bluetooth/ @sjanc @jhedberg @Vudentz

arch/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ config X86
3535
config X86_64
3636
bool "x86_64 architecture"
3737
select ATOMIC_OPERATIONS_BUILTIN
38+
select SCHED_IPI_SUPPORTED
3839

3940
config NIOS2
4041
bool "Nios II Gen 2 architecture"

arch/arc/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ depends on CPU_HAS_MPU
143143

144144
config ARC_MPU_ENABLE
145145
bool "Enable MPU"
146-
depends on CPU_HAS_MPU
147146
select ARC_MPU
148147
help
149148
Enable MPU

arch/arc/core/cache.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
static bool dcache_available(void)
5353
{
54-
unsigned long val = _arc_v2_aux_reg_read(_ARC_V2_D_CACHE_BUILD);
54+
unsigned long val = z_arc_v2_aux_reg_read(_ARC_V2_D_CACHE_BUILD);
5555

5656
val &= 0xff; /* extract version */
5757
return (val == 0) ? false : true;
@@ -60,7 +60,7 @@ static bool dcache_available(void)
6060
static void dcache_dc_ctrl(u32_t dcache_en_mask)
6161
{
6262
if (dcache_available()) {
63-
_arc_v2_aux_reg_write(_ARC_V2_DC_CTRL, dcache_en_mask);
63+
z_arc_v2_aux_reg_write(_ARC_V2_DC_CTRL, dcache_en_mask);
6464
}
6565
}
6666

@@ -101,13 +101,13 @@ static void dcache_flush_mlines(u32_t start_addr, u32_t size)
101101
key = irq_lock(); /* --enter critical section-- */
102102

103103
do {
104-
_arc_v2_aux_reg_write(_ARC_V2_DC_FLDL, start_addr);
104+
z_arc_v2_aux_reg_write(_ARC_V2_DC_FLDL, start_addr);
105105
__asm__ volatile("nop_s");
106106
__asm__ volatile("nop_s");
107107
__asm__ volatile("nop_s");
108108
/* wait for flush completion */
109109
do {
110-
if ((_arc_v2_aux_reg_read(_ARC_V2_DC_CTRL) &
110+
if ((z_arc_v2_aux_reg_read(_ARC_V2_DC_CTRL) &
111111
DC_CTRL_FLUSH_STATUS) == 0) {
112112
break;
113113
}
@@ -149,7 +149,7 @@ static void init_dcache_line_size(void)
149149
{
150150
u32_t val;
151151

152-
val = _arc_v2_aux_reg_read(_ARC_V2_D_CACHE_BUILD);
152+
val = z_arc_v2_aux_reg_read(_ARC_V2_D_CACHE_BUILD);
153153
__ASSERT((val&0xff) != 0, "d-cache is not present");
154154
val = ((val>>16) & 0xf) + 1;
155155
val *= 16;

arch/arc/core/fast_irq.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ SECTION_FUNC(TEXT, _firq_exit)
145145
st r0, [r1]
146146

147147
#ifdef CONFIG_STACK_SENTINEL
148-
bl _check_stack_sentinel
148+
bl z_check_stack_sentinel
149149
#endif
150150

151151
#ifdef CONFIG_PREEMPT_ENABLED
@@ -284,7 +284,7 @@ _firq_return_from_coop:
284284
pop_s r0 /* status32 into r0 */
285285
/*
286286
* There are only two interrupt lock states: locked and unlocked. When
287-
* entering _Swap(), they are always locked, so the IE bit is unset in
287+
* entering z_swap(), they are always locked, so the IE bit is unset in
288288
* status32. If the incoming thread had them locked recursively, it
289289
* means that the IE bit should stay unset. The only time the bit
290290
* has to change is if they were not locked recursively.

arch/arc/core/fatal.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*
2626
* This routine is called when fatal error conditions are detected by software
2727
* and is responsible only for reporting the error. Once reported, it then
28-
* invokes the user provided routine _SysFatalErrorHandler() which is
28+
* invokes the user provided routine z_SysFatalErrorHandler() which is
2929
* responsible for implementing the error handling policy.
3030
*
3131
* The caller is expected to always provide a usable ESF. In the event that the
@@ -34,7 +34,7 @@
3434
*
3535
* @return This function does not return.
3636
*/
37-
void _NanoFatalErrorHandler(unsigned int reason, const NANO_ESF *pEsf)
37+
void z_NanoFatalErrorHandler(unsigned int reason, const NANO_ESF *pEsf)
3838
{
3939
LOG_PANIC();
4040

@@ -70,7 +70,7 @@ void _NanoFatalErrorHandler(unsigned int reason, const NANO_ESF *pEsf)
7070

7171
if (reason == _NANO_ERR_HW_EXCEPTION) {
7272
printk("Faulting instruction address = 0x%lx\n",
73-
_arc_v2_aux_reg_read(_ARC_V2_ERET));
73+
z_arc_v2_aux_reg_read(_ARC_V2_ERET));
7474
}
7575

7676
/*
@@ -81,12 +81,12 @@ void _NanoFatalErrorHandler(unsigned int reason, const NANO_ESF *pEsf)
8181
* decide.
8282
*/
8383

84-
_SysFatalErrorHandler(reason, pEsf);
84+
z_SysFatalErrorHandler(reason, pEsf);
8585
}
8686

87-
FUNC_NORETURN void _arch_syscall_oops(void *ssf_ptr)
87+
FUNC_NORETURN void z_arch_syscall_oops(void *ssf_ptr)
8888
{
8989
LOG_PANIC();
90-
_SysFatalErrorHandler(_NANO_ERR_KERNEL_OOPS, ssf_ptr);
90+
z_SysFatalErrorHandler(_NANO_ERR_KERNEL_OOPS, ssf_ptr);
9191
CODE_UNREACHABLE;
9292
}

arch/arc/core/fault.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ static const struct z_exc_handle exceptions[] = {
3434
*
3535
* This routine is called when fatal error conditions are detected by hardware
3636
* and is responsible only for reporting the error. Once reported, it then
37-
* invokes the user provided routine _SysFatalErrorHandler() which is
37+
* invokes the user provided routine z_SysFatalErrorHandler() which is
3838
* responsible for implementing the error handling policy.
3939
*/
4040
void _Fault(NANO_ESF *esf)
4141
{
4242
u32_t vector, code, parameter;
43-
u32_t exc_addr = _arc_v2_aux_reg_read(_ARC_V2_EFA);
44-
u32_t ecr = _arc_v2_aux_reg_read(_ARC_V2_ECR);
43+
u32_t exc_addr = z_arc_v2_aux_reg_read(_ARC_V2_EFA);
44+
u32_t ecr = z_arc_v2_aux_reg_read(_ARC_V2_ECR);
4545

4646
LOG_PANIC();
4747

@@ -64,7 +64,7 @@ void _Fault(NANO_ESF *esf)
6464

6565
/* exception raised by kernel */
6666
if (vector == 0x9 && parameter == _TRAP_S_CALL_RUNTIME_EXCEPT) {
67-
_NanoFatalErrorHandler(esf->r0, esf);
67+
z_NanoFatalErrorHandler(esf->r0, esf);
6868
return;
6969
}
7070

@@ -76,9 +76,9 @@ void _Fault(NANO_ESF *esf)
7676
* check violation
7777
*/
7878
if (vector == 6 && parameter == 2) {
79-
_NanoFatalErrorHandler(_NANO_ERR_STACK_CHK_FAIL, esf);
79+
z_NanoFatalErrorHandler(_NANO_ERR_STACK_CHK_FAIL, esf);
8080
return;
8181
}
8282
#endif
83-
_NanoFatalErrorHandler(_NANO_ERR_HW_EXCEPTION, esf);
83+
z_NanoFatalErrorHandler(_NANO_ERR_HW_EXCEPTION, esf);
8484
}

0 commit comments

Comments
 (0)