Commit cc547a76 authored by Andrzej Puzdrowski's avatar Andrzej Puzdrowski
Browse files

sim/mcuboot-sys: provide sim-own porting files

The sim platform was sharing a few header
files with the zephyr-rtos port. This patch provides
sim own headers.

Signed-off-by: default avatarAndrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
parent a914048b
Loading
Loading
Loading
Loading
+0 −1
Changes for sim/mcuboot-sys/build.rs: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -375,7 +375,6 @@ fn main() {
    conf.file("csupport/run.c");
    conf.conf.include("../../boot/bootutil/include");
    conf.conf.include("csupport");
    conf.conf.include("../../boot/zephyr/include");
    conf.conf.debug(true);
    conf.conf.flag("-Wall");
    conf.conf.flag("-Werror");
+38 −0
Changes for sim/mcuboot-sys/csupport/flash_map_backend/flash_map_backend.h: 38 added lines, 0 removed lines.
Original line number Diff line number Diff line
#ifndef __FLASH_MAP_BACKEND_H__
#define __FLASH_MAP_BACKEND_H__

#include <storage/flash_map.h>

static inline uint32_t flash_area_get_off(const struct flash_area *fa)
{
	return (uint32_t)fa->fa_off;
}

static inline uint32_t flash_area_get_size(const struct flash_area *fa)
{
	return (uint32_t)fa->fa_size;
}

static inline uint32_t flash_sector_get_off(const struct flash_sector *fs)
{
	return fs->fs_off;
}

static inline uint32_t flash_sector_get_size(const struct flash_sector *fs)
{
	return fs->fs_size;
}

#define FLASH_DEVICE_ID 0

static inline uint8_t flash_area_get_device_id(const struct flash_area *fa)
{
    return fa->fa_device_id;
}

static inline uint8_t flash_area_get_id(const struct flash_area *fa)
{
	return fa->fa_id;
}

#endif /* __FLASH_MAP_BACKEND_H__*/
+28 −0
Changes for sim/mcuboot-sys/csupport/mcuboot_config/mcuboot_config.h: 28 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*
 * Copyright (c) 2022 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#ifndef __MCUBOOT_CONFIG_H__
#define __MCUBOOT_CONFIG_H__

/*
 * This file is included by the simulator, but we don't want to
 * define almost anything here.
 *
 * Instead of using mcuboot_config.h, the simulator adds MCUBOOT_xxx
 * configuration flags to the compiler command lines based on the
 * values of environment variables. However, the file still must
 * exist, or bootutil won't build.
 */

#define MCUBOOT_WATCHDOG_FEED()         \
    do {                                \
    } while (0)

#define MCUBOOT_CPU_IDLE() \
    do {                                \
    } while (0)

#endif /* __MCUBOOT_CONFIG_H__ */
+10 −0
Changes for sim/mcuboot-sys/csupport/os/os_heap.h: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*
 * Copyright (c) 2022 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#ifndef H_OS_HEAP_
#define H_OS_HEAP_

#endif
+10 −0
Changes for sim/mcuboot-sys/csupport/os/os_malloc.h: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*
 * Copyright (c) 2022 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#ifndef H_OS_MALLOC_
#define H_OS_MALLOC_

#endif
Loading