저는 mbed와 uvisor에 새로운 것이므로 문제는 어떻게 작동하는지 이해하는 것입니다. 나는 mbed와 uvisor에 대해 배우려는 NXP FRDM-K64F 보드를 가지고 있습니다. 나는 성공적으로 여러 상자에서 실행되는 작업의 몇 가지 기본 예제를 실행하여 컴파일했습니다. 나는 uvisor의 상자 중 하나에 연결하려고하지만 뭔가 올바르게 작동하지 않습니다.mbed uvisor 및 EthernetInterface가 넘쳤습니다
이 주 파일 코드 :
#include "uvisor-lib/uvisor-lib.h"
#include "mbed.h"
#include "main-hw.h"
#include "EthernetInterface.h"
// Network interface
EthernetInterface net;
struct box_context {
Thread * thread;
uint32_t heartbeat;
};
static const UvisorBoxAclItem acl[] = {
};
static void my_box_main(const void *);
/* Box configuration
* We need 1kB of stack both in the main and interrupt threads as both of them
* use printf. */
UVISOR_BOX_NAMESPACE(NULL);
UVISOR_BOX_HEAPSIZE(3072);
UVISOR_BOX_MAIN(my_box_main, osPriorityNormal, 1024);
UVISOR_BOX_CONFIG(my_box, acl, 1024, box_context);
static void my_box_main(const void *)
{
while (1) {
printf("tan tan\r\n");
Thread::wait(2000);
}
}
나는 아직 특정 연결 코드를 추가하지 않았는 EthernetInterface 개체의 바로 정의 :이 상자 파일의 코드가
#include "uvisor-lib/uvisor-lib.h"
#include "mbed.h"
#include "main-hw.h"
/* Create ACLs for main box. */
MAIN_ACL(g_main_acl);
/* Enable uVisor. */
UVISOR_SET_MODE_ACL(UVISOR_ENABLED, g_main_acl);
UVISOR_SET_PAGE_HEAP(8 * 1024, 5);
int main(void)
{
printf("----Eup---------\r\n");
DigitalOut led(MAIN_LED);
while (1) {
printf("taka\r\n");
led = !led;
/* Blink once per second. */
Thread::wait(1000);
}
return 0;
}
입니다 컴파일시 다음 오류가 발생합니다.
../../../../arm-none-eabi/bin/ld.exe: Region m_data_2 overflowed with stack and heap
collect2.exe: error: ld returned 1 exit status
나는 changi를 시도했습니다. 힙 크기의 값을 설정했지만 작동하도록 만드는 방법을 찾지 못했습니다. 내가 뭘 놓치고 있니?