mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 21:24:32 +02:00
Merge branch 'bugfix/inline_get_cpu_id_hal_func' into 'master'
soc: put hal function to get core id in IRAM See merge request espressif/esp-idf!8107
This commit is contained in:
@@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "esp_attr.h"
|
||||||
|
|
||||||
#include "soc/cpu_caps.h"
|
#include "soc/cpu_caps.h"
|
||||||
|
|
||||||
#include "xt_instr_macros.h"
|
#include "xt_instr_macros.h"
|
||||||
@@ -27,7 +29,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline int cpu_ll_get_core_id(void)
|
static inline int IRAM_ATTR cpu_ll_get_core_id(void)
|
||||||
{
|
{
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
asm volatile (
|
asm volatile (
|
||||||
|
@@ -12,9 +12,10 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "esp_attr.h"
|
||||||
|
|
||||||
#include "soc/cpu_caps.h"
|
#include "soc/cpu_caps.h"
|
||||||
|
|
||||||
#include "xt_instr_macros.h"
|
#include "xt_instr_macros.h"
|
||||||
@@ -27,7 +28,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline int cpu_ll_get_core_id(void)
|
static inline int IRAM_ATTR cpu_ll_get_core_id(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
1
tools/test_apps/system/startup/sdkconfig.ci.opt_o0
Normal file
1
tools/test_apps/system/startup/sdkconfig.ci.opt_o0
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CONFIG_COMPILER_OPTIMIZATION_NONE=y
|
Reference in New Issue
Block a user