Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/msp430: implement get_caller_pc #20602

Merged
merged 1 commit into from
Apr 22, 2024
Merged
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
9 changes: 3 additions & 6 deletions cpu/msp430/include/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@
#ifndef CPU_H
#define CPU_H

#include <stdio.h>
#include <stdint.h>

#include <msp430.h>
#include "board.h"

#include "sched.h"
#include "thread.h"
#include "cpu_conf.h"

#ifdef __cplusplus
extern "C" {
Expand All @@ -41,7 +39,7 @@
/**
* @brief Macro for defining interrupt service routines
*/
#define ISR(a,b) void __attribute__((naked, interrupt (a))) b(void)

Check warning on line 42 in cpu/msp430/include/cpu.h

View workflow job for this annotation

GitHub Actions / static-tests

comma should be followed by whitespace

/**
* @brief The current ISR state (inside or not)
Expand Down Expand Up @@ -118,12 +116,11 @@

/**
* @brief Returns the last instruction's address
*
* @todo: Not supported
*/
__attribute__((always_inline))
static inline uintptr_t cpu_get_caller_pc(void)
{
return 0;
return (uintptr_t)__builtin_return_address(0);
}

#ifdef __cplusplus
Expand Down
Loading