I'm trying to set eclipse up so that I can write code for the 8051 microcontroller in an NRF24LE1 radio transceiver. I'm using a tutorial which provides libraries for the chip but I think I didn't link the libraries properly because I'm getting a number of Symbol could not be resolved errors but I'm not sure how to fix it. Can anyone advise on what I've done wrong?
#include <stdint.h>
#include <stdio.h>
//??????????? ??????????? ???????:
#include "src/gpio/src/gpio_pin_configure.c"
#include "src/gpio/src/gpio_pin_val_clear.c"
#include "src/gpio/src/gpio_pin_val_set.c"
#include "delay.h"
#include "src/delay/src/delay_us.c"
#include "src/delay/src/delay_s.c"
#include "src/delay/src/delay_ms.c"
void main()
{
// ?????? ?????? P0_0
gpio_pin_configure(GPIO_PIN_ID_P0_0, // ?????? ??????????? ?????????
GPIO_PIN_CONFIG_OPTION_DIR_OUTPUT |
GPIO_PIN_CONFIG_OPTION_OUTPUT_VAL_CLEAR |
GPIO_PIN_CONFIG_OPTION_PIN_MODE_OUTPUT_BUFFER_NORMAL_DRIVE_STRENGTH);
while(1)
{
gpio_pin_val_set(GPIO_PIN_ID_P0_0); //????????? 1
delay_ms(500);
gpio_pin_val_clear(GPIO_PIN_ID_P0_0); //????????? 0
delay_ms(500);
}
}
Errors are:
Description Resource Path Location Type
make.exe: *** [Blinky.rel] Error -1073741515 NRF24LE1 - Test 1 C/C++ Problem
Symbol 'GPIO_PIN_CONFIG_OPTION_DIR_OUTPUT' could not be resolved Blinky.c /NRF24LE1 - Test 1 line 20 Semantic Error
Symbol 'GPIO_PIN_CONFIG_OPTION_OUTPUT_VAL_CLEAR' could not be resolved Blinky.c /NRF24LE1 - Test 1 line 21 Semantic Error
Symbol 'GPIO_PIN_CONFIG_OPTION_PIN_MODE_OUTPUT_BUFFER_NORMAL_DRIVE_STRENGTH' could not be resolved Blinky.c /NRF24LE1 - Test 1 line 22 Semantic Error
Symbol 'GPIO_PIN_ID_P0_0' could not be resolved Blinky.c /NRF24LE1 - Test 1 line 19 Semantic Error
Symbol 'GPIO_PIN_ID_P0_0' could not be resolved Blinky.c /NRF24LE1 - Test 1 line 26 Semantic Error
Symbol 'GPIO_PIN_ID_P0_0' could not be resolved Blinky.c /NRF24LE1 - Test 1 line 28 Semantic Error
I have Eclipse IDE for C/C++ Developers
Version: Photon Release (4.8.0)
Build id: 20180619-1200
I can't include links because this is my first post but I used Tutorial 1 to install SDCC in eclipse and Tutorial 2 is where I got the LED blinking example. The author of tutorial 2 provides libraries so I copied the .h files from Tutorial 2 into the SDCC include folder created in Tutorial 1. I also copied the src folder from Tutorial 2 into the SDCC include folder created in Tutorial 1. This meant the code didn't throw errors at the #include section but then I got the errors above.