cpu.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2023 Gunar Schorcht
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
16 #include "cpu_conf.h"
17 #include "cpu_common.h"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
26 static inline uint32_t cpu_get_image_baseaddr(void)
27 {
28  extern uint8_t _start;
29  return (uint32_t)&_start;
30 }
31 
35 static inline void cpu_jump_to_image(uint32_t addr)
36 {
37  __asm__ volatile ("jr %0" :: "r" (addr));
38 }
39 
40 #ifdef __cplusplus
41 }
42 #endif
43 
static uint32_t cpu_get_image_baseaddr(void)
Returns the address of running application in flash.
Definition: cpu.h:26
static void cpu_jump_to_image(uint32_t addr)
Starts another image in flash.
Definition: cpu.h:35
Implementation specific CPU configuration options.