Tricore コントローラー用の C プログラムを作成しましたが、コンパイル後に以下のエラー メッセージが表示されましたが、実際には理解できません。いくつか入力してください。
メモリ階層に関連するものは推測できますが、実際の問題はまだわかりません。
Error Messages:
ltc I455: requirement: 193K (0x304c8) bytes of RAM area in space spe:tc:linear
amk E451: make stopped
ltc I456: section type: group restriction - clustered
ltc I457: .bss.Pro2.group (60) (0x30140 bytes)
ltc I457: .bss._dbg_request.libcs_fpu (418) (0x14 bytes)
ltc I457: .bss.Pro2.rocount (61) (0x2d4 bytes)
ltc I457: .bss.stdin_buf.libcs_fpu (273) (0x50 bytes)
ltc I457: .bss.stdout_buf.libcs_fpu (274) (0x50 bytes)
コード :
/*
============================================================================
Name : hough.c
Author :
Version :
Copyright : Your copyright notice
Description : Hello World in C, Ansi-style
============================================================================
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define M 4
#define N 4
#define PI 3.14159265
typedef struct point {
int x;
int y;
} point;
typedef struct points {
point points[M * N];
double ro;
int pointCount;
} points;
int image[M][N] = { { 1, 1, 0, 1 }, { 1, 1, 0, 1 }, { 1, 1, 1, 1 },
{ 1, 0, 0, 0 } };
int i, j, k;
points group[181][M * N / 2];
int rocount[181];
int compare_float(double f1, double f2) {
float precision = 0.000001;
if (((f1 - precision) < f2) && ((f1 + precision) > f2)) {
return 1;
} else {
return 0;
}
}
void insert(double ro, int x, int y, int angle) {
int loopcount;
int roflag = 0;
if (rocount[angle] == 0) {
group[angle][rocount[angle]].ro = ro;
group[angle][rocount[angle]].pointCount = 0;
group[angle][rocount[angle]].points[group[angle][rocount[angle]].pointCount].x =
x;
group[angle][rocount[angle]].points[group[angle][rocount[angle]].pointCount].y =
y;
group[angle][rocount[angle]].pointCount++;
rocount[angle]++;
} else {
for (loopcount = 0; loopcount < rocount[angle]; loopcount++) {
if (compare_float(group[angle][loopcount].ro, ro)) {
roflag = 1;
group[angle][loopcount].points[group[angle][loopcount].pointCount].x =
x;
group[angle][loopcount].points[group[angle][loopcount].pointCount].y =
y;
group[angle][loopcount].pointCount++;
break;
}
}
if (roflag == 0) {
group[angle][rocount[angle]].ro = ro;
group[angle][rocount[angle]].pointCount = 0;
group[angle][rocount[angle]].points[group[angle][rocount[angle]].pointCount].x =
x;
group[angle][rocount[angle]].points[group[angle][rocount[angle]].pointCount].y =
y;
group[angle][rocount[angle]].pointCount++;
rocount[angle]++;
}
}
}
int main(void) {
double ro;
point x1;
for (k = -90; k <= 90; k++) {
rocount[k + 90];
for (i = 0; i < M; i++) {
for (j = 0; j < N; j++) {
if (image[i][j] == 1) {
ro = (i + 1) * cos(k * (PI / 180))
+ (j + 1) * sin(k * (PI / 180));
insert(ro, i + 1, j + 1, k + 90);
}
}
}
}
for (k = -90; k <= 90; k++) {
for (i = 0; i < rocount[k + 90]; i++) {
printf("\n Angle :%d RO:%f \n", k, group[k + 90][i].ro);
for (j = 0; j < group[k + 90][i].pointCount; j++) {
printf("(x:%d,y:%d)", group[k + 90][i].points[j].x,
group[k + 90][i].points[j].y);
}
}
}
return EXIT_SUCCESS;
}
PS: コードは TC1797 マイクロコントローラー用に書かれています。