stupid question from an absolute newbie

Questions for programming 8051 microcontrollers in C or assembly using SDCC

stupid question from an absolute newbie

Postby joselalupa » Wed May 20, 2015 3:59 pm

i've downloaded your sdk and i have the code, now my question is what is next? how do i use it? i asume is not eclipse, wich ide should i use? sdcc? any other consideration? thanks in advance and sorry if the answer is too obvious
joselalupa
 
Posts: 32
Joined: Tue Aug 12, 2014 4:44 pm

Re: stupid question from an absolute newbie

Postby brennen » Mon May 25, 2015 6:42 pm

I use Eclipse IDE. All of the projects should be set up so that you can directly import the project into your Eclipse workspace (DO NOT USE THE SDCC VERSION OF ECLIPSE IDE). You'll need to install SDCC. If you're running Windows, you'll need to install Cygwin with the full development package.

Download the SDK and the example RF project and unzip them into the same parent directory. Import them into Eclipse, and you should be able to build them immediately.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Re: stupid question from an absolute newbie

Postby joselalupa » Tue Jun 02, 2015 2:26 pm

i did al the instalation you says: sdcc, latest, eclipse luna and cygwin, all installed in default directory, when i try build the project in order to start trying the sdk i get 8 errors:

/bin/sh: sed: command not found lib_nrf24le1_sdk C/C++ Problem
make: *** [make__target_sdcc_nrf24le1_24] Error 2 lib_nrf24le1_sdk C/C++ Problem
make[1]: *** [all] Error 2 lib_nrf24le1_sdk C/C++ Problem
make[2]: *** [../src/acomp] Error 2 lib_nrf24le1_sdk C/C++ Problem
make[3]: *** No rule to make target '../..//MakefileSrc'. Stop. lib_nrf24le1_sdk C/C++ Problem
recipe for target '../src/acomp' failed Makefile /lib_nrf24le1_sdk line 80 C/C++ Problem
recipe for target 'all' failed Makefile /lib_nrf24le1_sdk line 73 C/C++ Problem
recipe for target 'make__target_sdcc_nrf24le1_24' failed Makefile /lib_nrf24le1_sdk line 13 C/C++ Problem

any help or idea?
joselalupa
 
Posts: 32
Joined: Tue Aug 12, 2014 4:44 pm

Re: stupid question from an absolute newbie

Postby brennen » Tue Jun 02, 2015 2:47 pm

The first line in your build output shows you're missing the "sed" command. I can't remember which section of Cygwin that sed lives in, but you'll need to use the Cygwin installer to get sed.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Re: stupid question from an absolute newbie

Postby joselalupa » Tue Jun 02, 2015 4:03 pm

ok, i am installing all modules, let you know, thanks a lot for your patience
joselalupa
 
Posts: 32
Joined: Tue Aug 12, 2014 4:44 pm

Re: stupid question from an absolute newbie

Postby joselalupa » Mon Jun 08, 2015 11:27 pm

i did what you says and several things happened:
when i import the folder with the files i unziped from sdk and tutorial i get three projects in eclipse: sdk, remote and local
if i build the sdk with local and remote closed it build fine, no error.
if i build with local and remote open it is obvious i get error because sdk is a different project.
i move all the files from remote and i get tons of error:

fatal error: target_nrf24le1_sdk.h: No such file or directory reg24le1.h /lib_nrf24le1_sdk/include line 33
make: *** [make_sdcc_nrf24le1] Error 2 lib_nrf24le1_sdk
make[1]: *** [build] Error 2 lib_nrf24le1_sdk
make[2]: *** [../src/acomp] Error 2 lib_nrf24le1_sdk
make[3]: *** No rule to make target '../../_target_sdcc_nrf24le1/dep/acomp/acomp_configure.d', needed by '../../_target_sdcc_nrf24le1/obj/acomp/acomp_configure.rel'. Stop. lib_nrf24le1_sdk
recipe for target '../src/acomp' failed Makefile /lib_nrf24le1_sdk line 74
recipe for target 'build' failed Makefile /lib_nrf24le1_sdk line 69
recipe for target 'make_sdcc_nrf24le1' failed Makefile /lib_nrf24le1_sdk line 4

is there any solution? what i am doing wrong?
joselalupa
 
Posts: 32
Joined: Tue Aug 12, 2014 4:44 pm

Re: stupid question from an absolute newbie

Postby brennen » Tue Jun 09, 2015 12:05 pm

OK the SDK and the remote and local folders all need to be under the same parent folder. It looks like you don't have them set up this way, looking at the output.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Re: stupid question from an absolute newbie

Postby joselalupa » Tue Jun 09, 2015 12:16 pm

i got it working...at least no more error, i'll start playing, hope to find the module configuration to make it communicate with nrf24l01 module
joselalupa
 
Posts: 32
Joined: Tue Aug 12, 2014 4:44 pm

Re: stupid question from an absolute newbie

Postby brennen » Wed Jun 10, 2015 12:13 pm

The code is already set up to communicate using the 24L01+ module on-board. You just connect the local unit to a serial port adapter to your computer and use a terminal to type characters. The local will try to send that character to the remote, and the remote will return the character to the local unit. The local unit will then send the character back to your computer over serial and you should see it show up on the terminal. Check out the documentation for tutorial 1 on the main site.
brennen
Site Admin
 
Posts: 395
Joined: Sun Aug 17, 2008 2:15 pm

Re: stupid question from an absolute newbie

Postby joselalupa » Thu Jun 11, 2015 6:58 pm

my last questions before start playing and adapting.
i come from arduino where we have mirf library wich has some functions defined:
radio.setRetries(15,15);
radio.setPALevel(RF24_PA_LOW);
radio.setDataRate(RF24_2MBPS);
radio.setChannel(50);
radio.openWritingPipe(0xF0F0F0F0E1LL);
radio.openReadingPipe(1, 0xF0F0F0F0D2LL);
radio.startListening();

how can it be adapted to your sdk or how can i control them by your sdk? i mainly need power level and the pipes, i think the rest won't be a trouble
joselalupa
 
Posts: 32
Joined: Tue Aug 12, 2014 4:44 pm

Next

Return to 8051 Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron