Reputation: 1
I'm using the Z88DK C compiler to control my Z80 CPU. While trying to link the FreeRTOS library to my project, I've run into some issues. I'm configuring the Z80 with EEPROM from 0 to FFF and RAM from 1000 to FFF7, reserving 8 bytes for other usage. The bin file I'm generating will be used in a Proteus 8 simulation on the EEPROM. However, I'm having trouble with linking the FreeRTOS library
well here's the c file (named test.c) :
#include "include/FreeRTOS.h"
#include "include/sdcc/task.h"
int main(void) {
unsigned short* p1 = (unsigned short*)0xFFF7;
unsigned short* tracker1 = (unsigned short*)0xFFF8;
unsigned short* tracker2 = (unsigned short*)0xFFF9;
unsigned short* tracker3 = (unsigned short*)0xFFFA;
unsigned short* tracker4 = (unsigned short*)0xFFFB;
*p1 |= 0x01;
vTaskDelay(pdMS_TO_TICKS(1000)); // Delay for 1000 milliseconds
*tracker1 = ((*p1 >> 4) & 0x01)? 0x02:0x01;
*tracker2 = ((*p1 >> 5) & 0x01)? 0x02:0x01;
*tracker3 = ((*p1 >> 6) & 0x01)? 0x02:0x01;
for(;;); }
As I mentioned, I'm using the Z88DK compiler with this command to generate the bin file:
zcc +z80 -O3 -clib=classic test.c -o test.bin -crt0=crt0.asm -m -compiler=sdcc
with ctr0.asm :
EXTERN _main
defc CRT_ORG_CODE = 0x0000
org CRT_ORG_CODE
start:
jp _main
initially i had a error message :
test.c:19: error 20: Undefined identifier 'configTICK_RATE_HZ'
so i added this line of code to FreeRTOSConfig.h:
#define configTICK_RATE_HZ 1000
then i had this error:
test.c:321: error: undefined symbol: _vTaskDelay
^---- _vTaskDelay
The header files I'm using are represented within the GitHub repo. hereI wanted to use vTaskDelay but couldn't.
Upvotes: 0
Views: 60