Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse SDCC and NRF24LE1 8051 code(Need help setting up eclipse to create code for NRF24LE1)
Eclipse SDCC and NRF24LE1 8051 code [message #1826076] Sat, 18 April 2020 12:02 Go to next message
Oisin O'Conchubhair is currently offline Oisin O'ConchubhairFriend
Messages: 1
Registered: April 2020
Junior Member
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.
Re: Eclipse SDCC and NRF24LE1 8051 code [message #1826087 is a reply to message #1826076] Sat, 18 April 2020 22:13 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
I suppose it never occurred to you to ask the tutorials author why the examples don't work.

You failed to mention you are running under Windows.
The first error from Make is -1073741515 which is really 0xC0000135 .
This is the Windows STOP error.
Read here:
https://answers.microsoft.com/en-us/windows/forum/windows_vista-windows_programs/application-error-0xc0000135/e6bd0a34-fd74-4cb7-bea6-238ae84d5d13
and here:
https://www.drivethelife.com/windows-games/fix-0xc0000135-error-windows-10-8-7-vista-xp.html
Not endorsing these. There are others.
You will need to fix this first.

Make is merely echoing an error code that it received.
The actual error likely came from the compiler.
You will have to examine the build log to determine what was said.

The compiler and linker are tools external to Eclipse.
Problems using them are almost never problems within Eclipse.
How to circumvent them is usually off topic for this forum which is to address problems with CDT itself.


-------------------
Assuming you are using the vanilla CDT and no plugins:

You have to tell two different things where your headers can be found:

  1. the compiler via the makefile
  2. the CDT Indexer
They are independent.

To do (1) Set the include path for each compiler at:
Project --> Properties --> C/C+ Build --> Settings --> Tool Settings tab --> <compiler> --> Includes
This only works when Eclipse is generating the Makefile.

To do (2) Set the include path as a User Entry at:
Project --> Properties --> C/C++ General --> Preprocessor Include Paths, Macros etc. --> Entries tab --> <language>
--------------
I suggest installing a more up-to-date version of Eclipse.
Won't fix your problems but will be better in the long run.

UPDATE:
If this is what you installed then you really should direct your questions there.
I'm not saying you won't get answers here
but you are more likely to get them from the authors of this plugin.
You can't expect that we know the ins-and-outs of every third party add on.
if you are the RCTractorGuy then I see you already have.

https://github.com/rgwan/librech551/wiki/Setup-SDCC-developing-environment-with-Eclipse
http://ecee.colorado.edu/~mcclurel/Installing_SDCC-Eclipse_2-28-2007_handouts6.pdf

[Updated on: Sun, 19 April 2020 12:05]

Report message to a moderator

Previous Topic:Error attempt to build 'No esp launch target found.'
Next Topic:Facing Certain Issues While Create a Program to Toggle kth Bit Of a Number
Goto Forum:
  


Current Time: Fri Apr 26 10:05:40 GMT 2024

Powered by FUDForum. Page generated in 0.03056 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top