Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ jobs:
-e KconfigBasicNoModules \
-e ClangFormat \
-e Ruff \
-e SysbuildKconfigBasicNoModules
-e SysbuildKconfigBasicNoModules \
-e LicenseAndCopyrightCheck
- name: Process Compliance Results
working-directory: serial_modem
Expand Down
1 change: 1 addition & 0 deletions app/overlay-full_fota.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ CONFIG_SPI_NOR=y
CONFIG_DFU_TARGET_STREAM=y
CONFIG_DFU_TARGET_FULL_MODEM=y
CONFIG_FMFU_FDEV_SKIP_PREVALIDATION=n
CONFIG_TFM_PROFILE_TYPE_NOT_SET=y
CONFIG_MBEDTLS_LEGACY_CRYPTO_C=y
CONFIG_MBEDTLS_SHA256_C=y
CONFIG_FMFU_FDEV=y
Expand Down
144 changes: 144 additions & 0 deletions app/pm_static_nrf9151dk_nrf9151_ns_full_fota.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# Partition manager configuration for full modem FOTA with
# CONFIG_TFM_PROFILE_TYPE_NOT_SET.
# TODO: PPP+CMUX doesn't fit with this configuration at the moment.
# Partition table has to be optimized later.
app:
address: 0x38000
end_address: 0x7e000
placement:
align:
start: 0x8000
region: flash_primary
size: 0x46000
mcuboot:
address: 0x0
end_address: 0x10000
region: flash_primary
size: 0x10000
mcuboot_pad:
address: 0x10000
end_address: 0x10200
placement:
align:
start: 0x8000
region: flash_primary
size: 0x200
mcuboot_primary:
address: 0x10000
end_address: 0x86000
region: flash_primary
sharers: 0x1
size: 0x76000
span:
- tfm
- app
- mcuboot_pad
mcuboot_primary_app:
address: 0x10200
end_address: 0x86000
region: flash_primary
size: 0x75e00
span:
- app
- tfm
mcuboot_secondary:
address: 0x86000
end_address: 0xfc000
region: flash_primary
share_size:
- mcuboot_primary
size: 0x76000
mcuboot_sram:
address: 0x20000000
end_address: 0x20006000
region: sram_primary
size: 0x6000
span:
- tfm_sram
nonsecure_storage:
address: 0xfc000
end_address: 0x100000
region: flash_primary
size: 0x4000
span:
- settings_storage
otp:
address: 0xff8108
end_address: 0xff83fc
region: otp
size: 0x2f4
settings_storage:
address: 0xfc000
end_address: 0x100000
inside:
- nonsecure_storage
region: flash_primary
size: 0x4000
sram_secure:
address: 0x20000000
end_address: 0x20016000
region: sram_primary
size: 0x16000
span:
- tfm_sram
tfm:
address: 0x10200
end_address: 0x38000
inside:
- mcuboot_primary_app
region: flash_primary
size: 0x27e00
tfm_its:
address: 0x7e000
end_address: 0x80000
inside:
- tfm_storage
region: flash_primary
size: 0x2000
tfm_nonsecure:
address: 0x38000
end_address: 0x7e000
placement:
align:
start: 0x8000
region: flash_primary
size: 0x46000
span:
- app
tfm_otp_nv_counters:
address: 0x80000
end_address: 0x82000
inside:
- tfm_storage
region: flash_primary
size: 0x2000
tfm_ps:
address: 0x82000
end_address: 0x86000
inside:
- tfm_storage
region: flash_primary
size: 0x4000
tfm_secure:
address: 0x10200
end_address: 0x38000
region: flash_primary
size: 0x27e00
span:
- tfm
tfm_sram:
address: 0x20000000
end_address: 0x20016000
inside:
- sram_secure
region: sram_primary
size: 0x16000
tfm_storage:
address: 0x7e000
end_address: 0x86000
region: flash_primary
size: 0x8000
span:
- tfm_its
- tfm_otp_nv_counters
- tfm_ps
7 changes: 3 additions & 4 deletions app/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ CONFIG_NET_IPV6=y
# Modem library
CONFIG_NRF_MODEM_LIB=y
CONFIG_AT_CMD_CUSTOM=y
# Align the max FD entry to NRF_MODEM_MAX_SOCKET_COUNT(8)
CONFIG_ZVFS_OPEN_MAX=8

# Handle modem fault
CONFIG_NRF_MODEM_LIB_ON_FAULT_APPLICATION_SPECIFIC=y
Expand Down Expand Up @@ -119,8 +117,9 @@ CONFIG_AT_MONITOR=y
# Eventfd's to use with AT-commands.
CONFIG_ZVFS_EVENTFD_MAX=2

# Disable TF-M logging.
# TF-M log sending will block until remote end is ready, when HWFC is used on UART1.
# TF-M
CONFIG_TFM_PROFILE_TYPE_MINIMAL=y
# Disable TF-M log sending as it will block until remote end is ready, when HWFC is used on UART1.
CONFIG_TFM_LOG_LEVEL_SILENCE=y

#
Expand Down
1 change: 1 addition & 0 deletions app/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ tests:
build_only: true
extra_args:
- EXTRA_CONF_FILE="overlay-full_fota.conf"
- PM_STATIC_YML_FILE=pm_static_nrf9151dk_nrf9151_ns_full_fota.yml
extra_configs:
- CONFIG_SM_DFU_MODEM_FULL=y
platform_allow:
Expand Down
10 changes: 5 additions & 5 deletions app/src/sm_at_icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static uint32_t send_ping_wait_reply(void)
const uint16_t icmp_hdr_len = ICMP_HDR_LEN;
struct timeval tv;

if (si->ai_family == AF_INET) {
if (si->ai_family == NET_AF_INET) {
/* Generate IPv4 ICMP EchoReq */

/* Ping header */
Expand Down Expand Up @@ -469,8 +469,8 @@ static int ping_test_handler(const char *target)
}

/* Use the first result to decide which address family to use */
if (res->ai_family == AF_INET) {
char ipv4_addr[INET_ADDRSTRLEN];
if (res->ai_family == NET_AF_INET) {
char ipv4_addr[NET_INET_ADDRSTRLEN];

LOG_INF("Ping target's IPv4 address");
util_get_ip_addr(ping_argv.pdn, ipv4_addr, NULL);
Expand All @@ -489,8 +489,8 @@ static int ping_test_handler(const char *target)
return -ret;
}
ping_argv.src = res;
} else if (res->ai_family == AF_INET6) {
char ipv6_addr[INET6_ADDRSTRLEN];
} else if (res->ai_family == NET_AF_INET6) {
char ipv6_addr[NET_INET6_ADDRSTRLEN];

LOG_INF("Ping target's IPv6 address");
util_get_ip_addr(ping_argv.pdn, NULL, ipv6_addr);
Expand Down
6 changes: 3 additions & 3 deletions app/src/sm_at_mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ static int broker_init(void)
if (err) {
return -EAGAIN;
}
if (sa.sa_family == AF_INET) {
if (sa.sa_family == NET_AF_INET) {
ctx.broker = *(struct sockaddr_in *)&sa;
} else {
ctx.broker6 = *(struct sockaddr_in6 *)&sa;
Expand Down Expand Up @@ -374,7 +374,7 @@ static int do_mqtt_connect(void)
}

/* MQTT client configuration */
if (ctx.family == AF_INET) {
if (ctx.family == NET_AF_INET) {
client.broker = &ctx.broker;
} else {
client.broker = &ctx.broker6;
Expand Down Expand Up @@ -591,7 +591,7 @@ static int handle_at_mqtt_connect(enum at_parser_cmd_type cmd_type, struct at_pa
return err;
}
}
ctx.family = (op == MQTTC_CONNECT) ? AF_INET : AF_INET6;
ctx.family = (op == MQTTC_CONNECT) ? NET_AF_INET : NET_AF_INET6;
err = do_mqtt_connect();
} else if (op == MQTTC_DISCONNECT) {
err = do_mqtt_disconnect();
Expand Down
Loading