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
17#ifndef CPU_H
18#define CPU_H
19
20#include "cpu_conf.h"
21#include "cpu_common.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
30static inline uint32_t cpu_get_image_baseaddr(void)
31{
32 extern uint8_t _start;
33 return (uint32_t)&_start;
34}
35
39static inline void cpu_jump_to_image(uint32_t addr)
40{
41 __asm__ volatile ("jr %0" :: "r" (addr));
42}
43
44#ifdef __cplusplus
45}
46#endif
47
48#endif /* CPU_H */
static uint32_t cpu_get_image_baseaddr(void)
Returns the address of running application in flash.
Definition cpu.h:30
static void cpu_jump_to_image(uint32_t image_address)
Jumps to another image in flash.
Definition cpu.h:194
Implementation specific CPU configuration options.