Loading...
Searching...
No Matches
cpu.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2023 Gunar Schorcht
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
18
19#include "cpu_conf.h"
20#include "cpu_common.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
29static inline uint32_t cpu_get_image_baseaddr(void)
30{
31 extern uint8_t _start;
32 return (uint32_t)&_start;
33}
34
38static inline void cpu_jump_to_image(uint32_t addr)
39{
40 __asm__ volatile ("jr %0" :: "r" (addr));
41}
42
43#ifdef __cplusplus
44}
45#endif
46
static uint32_t cpu_get_image_baseaddr(void)
Returns the address of running application in flash.
Definition cpu.h:29
CPU specific configuration options.
static void cpu_jump_to_image(uint32_t image_address)
Jumps to another image in flash.
Definition cpu.h:193