728x90
반응형
기본적으로 FPU(부동소수점 처리 장치, Floating-Point Unit)가 비활성화 되어있음.
에러는 아래에 표시함.
이를 활성화 시키기 위해서는 다음과 같은 코드를 추가해야함.
| 방법 | 적용 범위 | 설정 위치 |
|---|---|---|
| `rtems_task_create(..., RTEMS_FLOATING_POINT, ...)` | 개별 태스크 | 태스크 생성 시 |
| `CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT` | Init 태스크만 | 컴파일 시 설정 |
// Thread(TASK) 생성 시
sc = rtems_task_create(
rtems_build_name('T', 'A', 'S', 'K' + i),
1,
RTEMS_MINIMUM_STACK_SIZE ,
RTEMS_DEFAULT_MODES,
RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT,
&ctx->id
);
// RTEMS_FLOATING_POINT 을 명시
// INIT TASK에서 활성화 시키는 법
#define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT
FPU가 활성화 되어 있지 않다면 아래와 같은 에러가 나옴
*** FATAL ***
fatal source: 9 (RTEMS_FATAL_SOURCE_EXCEPTION)
CPU: 0
unexpected trap 4 (fp disabled)
PSR = 0xf34000c4
PC = 0x000012a8
nPC = 0x000012ac
WIM = 0x00000080
Y = 0x00000000
g0 = 0x00000000
g1 = 0x00019800
g2 = 0x00000000
g3 = 0x00050938
g4 = 0x000487e0
g5 = 0x00000000
g6 = 0x00050840
g7 = 0x000562d8
o0[CWP - 0] = 0x00000000
o1[CWP - 0] = 0x00000050
o2[CWP - 0] = 0x000487d0
o3[CWP - 0] = 0x00023b18
o4[CWP - 0] = 0x00023b18
o5[CWP - 0] = 0x000487c0
o6[CWP - 0] = 0x00056118
o7[CWP - 0] = 0x0000128c
l0[CWP - 0] = 0xf34000c5
l1[CWP - 0] = 0x000122b8
l2[CWP - 0] = 0x000122bc
l3[CWP - 0] = 0xf3400fc5
l4[CWP - 0] = 0x00011800
l5[CWP - 0] = 0x00000000
l6[CWP - 0] = 0x00000000
l7[CWP - 0] = 0x00000000
i0[CWP - 0] = 0x00050a60
i1[CWP - 0] = 0x000561d4
i2[CWP - 0] = 0x0004f568
i3[CWP - 0] = 0x00051800
i4[CWP - 0] = 0x000f5b88
i5[CWP - 0] = 0x00051c00
i6[CWP - 0] = 0x00056190
i7[CWP - 0] = 0x0000ab00
l0[CWP - 1] = 0x0001d488
l1[CWP - 1] = 0x0001d440
l2[CWP - 1] = 0x00000048
l3[CWP - 1] = 0x0004f400
l4[CWP - 1] = 0x0004f450
l5[CWP - 1] = 0x0004f464
l6[CWP - 1] = 0x0004f42c
l7[CWP - 1] = 0x0004f428
i0[CWP - 1] = 0x00023b18
i1[CWP - 1] = 0x000109e0
i2[CWP - 1] = 0x00000000
i3[CWP - 1] = 0x000561d4
i4[CWP - 1] = 0x00023b18
i5[CWP - 1] = 0x0004f450
i6[CWP - 1] = 0x000561f0
i7[CWP - 1] = 0x0000ae6c
l0[CWP - 2] = 0xf3400fc7
l1[CWP - 2] = 0x0000aac4
l2[CWP - 2] = 0x0000aac8
l3[CWP - 2] = 0xf34000c7
l4[CWP - 2] = 0x00000000
l5[CWP - 2] = 0x000237a0
l6[CWP - 2] = 0x000237dc
l7[CWP - 2] = 0x00000003
i0[CWP - 2] = 0x0007f0cc
i1[CWP - 2] = 0x00023c70
i2[CWP - 2] = 0x00000000
i3[CWP - 2] = 0x0001b000
i4[CWP - 2] = 0x00023b18
i5[CWP - 2] = 0x00000000
i6[CWP - 2] = 0x00055e60
i7[CWP - 2] = 0x00007ba4
l0[CWP - 3] = 0x00000000
l1[CWP - 3] = 0x00000001
l2[CWP - 3] = 0x00008014
l3[CWP - 3] = 0xf39000c0
l4[CWP - 3] = 0x00000000
l5[CWP - 3] = 0x00000000
l6[CWP - 3] = 0x00000000
l7[CWP - 3] = 0x00000000
i0[CWP - 3] = 0x00000001
i1[CWP - 3] = 0x026fe3bd
i2[CWP - 3] = 0x00000000
i3[CWP - 3] = 0x0001b000
i4[CWP - 3] = 0x00000001
i5[CWP - 3] = 0x00000000
i6[CWP - 3] = 0x00055ec0
i7[CWP - 3] = 0x0000abd0
l0[CWP - 4] = 0xf3400fc1
l1[CWP - 4] = 0x0000aac4
l2[CWP - 4] = 0x0000aac8
l3[CWP - 4] = 0xf34000c1
l4[CWP - 4] = 0x00000000
l5[CWP - 4] = 0x0004f464
l6[CWP - 4] = 0x00000000
l7[CWP - 4] = 0x00000000
i0[CWP - 4] = 0x00023b28
i1[CWP - 4] = 0x00055f80
i2[CWP - 4] = 0x00000000
i3[CWP - 4] = 0x0001b800
i4[CWP - 4] = 0x00000000
i5[CWP - 4] = 0x00000000
i6[CWP - 4] = 0x00055f30
i7[CWP - 4] = 0x00010d44
l0[CWP - 5] = 0x00000000
l1[CWP - 5] = 0x00000000
l2[CWP - 5] = 0x0000fd14
l3[CWP - 5] = 0x00000000
l4[CWP - 5] = 0x00000000
l5[CWP - 5] = 0x00000000
l6[CWP - 5] = 0x00050840
l7[CWP - 5] = 0x00000000
i0[CWP - 5] = 0x00050840
i1[CWP - 5] = 0xf30000e1
i2[CWP - 5] = 0x00048808
i3[CWP - 5] = 0x00000000
i4[CWP - 5] = 0x00000050
i5[CWP - 5] = 0x00055ff0
i6[CWP - 5] = 0x00055f90
i7[CWP - 5] = 0x000050f4
l0[CWP - 6] = 0x00000000
l1[CWP - 6] = 0x00000050
l2[CWP - 6] = 0x00050938
l3[CWP - 6] = 0x000487e0
l4[CWP - 6] = 0x00011800
l5[CWP - 6] = 0x0004f464
l6[CWP - 6] = 0x0004f42c
l7[CWP - 6] = 0x0004f428
i0[CWP - 6] = 0x000487c0
i1[CWP - 6] = 0x00023b18
i2[CWP - 6] = 0x00056110
i3[CWP - 6] = 0x00000050
i4[CWP - 6] = 0x00050920
i5[CWP - 6] = 0x00050840
i6[CWP - 6] = 0x000560b0
i7[CWP - 6] = 0x00005290
FSR = 0x00000000
fp0:fp1 = 0x0000000000000000
fp2:fp3 = 0x0000000000000000
fp4:fp5 = 0x0000000000000000
fp6:fp7 = 0x0000000000000000
fp8:fp9 = 0x0000000000000000
fp10:fp11 = 0x0000000000000000
fp12:fp13 = 0x0000000000000000
fp14:fp15 = 0x0000000000000000
fp16:fp17 = 0x0000000000000000
fp18:fp19 = 0x0000000000000000
fp20:fp21 = 0x0000000000000000
fp22:fp23 = 0x0000000000000000
fp24:fp25 = 0x0000000000000000
fp26:fp27 = 0x0000000000000000
fp28:fp29 = 0x0000000000000000
fp30:fp31 = 0x0000000000000000728x90
반응형
'# RTEMS' 카테고리의 다른 글
| RTEMS 'rtems_rate_monotonic_period'는 정말 "주기적"일까? (0) | 2025.11.04 |
|---|---|
| [RTEMS] 캐시 사이즈 측정 (0) | 2025.09.25 |
| [RTEMS] double 소수점 출력 함수 구현 (0) | 2025.09.11 |
| [RTEMS] 수행 시간 (0) | 2025.09.11 |
| [RTEMS] Tick 크기 변경 (0) | 2025.09.11 |