hlnd / nrf51-pure-gcc-setup Goto Github PK
View Code? Open in Web Editor NEWA simple and cross-platform GCC setup for nRF51-series development for Windows, OS X and Linux
License: BSD 3-Clause "New" or "Revised" License
A simple and cross-platform GCC setup for nRF51-series development for Windows, OS X and Linux
License: BSD 3-Clause "New" or "Revised" License
Hi,
I followed the steps in
http://qiita.com/mkftr/items/6144fbb3f20e124731bf
However, in the blinky example, when I type make, it yield
make: *** No rule to make target '_build/system_nrf51.o', needed by 'all'. Stop.
all the cross toolchains are installed, any hint ?
As also described here, there might currently no appropriate way to project specific customize stacksize and heapsize.
Ok, I cound just copy the startup_nrf51.s
to each project and edit the values there; but I don't like to do it in this way.
I'd rather want to have the possibility to specify that values as a optional variable (for each stack and heap) in my project's makefile.
I see 2 approaches to solve that:
startup_nrf51.s
changing #ifdef
etc. to .ifdef
and provide something like a AFLAGS
makefile variable. Or one step more comfortable, provinding STACK_SIZE
and HEAP_SIZE
as makefile variables and apply the required --defsym __STACK_SIZE=…
when arm-none-eabi-as
is called for startup_nrf51.s
.arm-none-eabi-gcc -x assembler-with-cpp
.I tend to favor the 1st approach (#ifdef
etc. to .ifdef
).
What did you think about that?
First - thanks for maintaing this repo, it has been incredibly helpful in getting me up and running with gcc tools on OS X. I'm new to bare ARM development and nordic devices so I apologize if I'm asking elementary questions.
I have an nrf51822 evaluation kit, using S110 softdevice version 6.0.0, SDK version 5_1_0_36092, ARM toolchain from here. The following shell variables are defined:
export SDK_PATH=$HOME/Development/nordic/nrf51_sdk_v5_1_0_36092/nrf51822/
export TEMPLATE_PATH=$HOME/Development/nordic/nrf51-pure-gcc-setup/template/
export USE_SOFTDEVICE=s110
I have a couple of questions that I'm hoping you can point me in the right direction to solve, I'm trying to compile the test project blinky_example
in the SDK:
board is not defined
error. In boards.h
the nrf51822 isn't listed - should I just use the nrf6310
definition?BOARD
and FAMILY
defines in main.c, running make main
gives me this:➜ make main
/Users/brian/Development/gcc-arm-none-eabi/bin/arm-none-eabi-objdump: '_build/.elf': No such file
/Users/brian/Development/gcc-arm-none-eabi/bin/arm-none-eabi-objdump: section '.text' mentioned in a -j option, but not found in any input file
/Users/brian/Development/gcc-arm-none-eabi/bin/arm-none-eabi-gcc -DBLE_STACK_SUPPORT_REQD -std=gnu99 -c -mthumb -mcpu=cortex-m0 -march=armv6-m -Wall -D -D -I/Users/brian/Development/nordic/nrf51_sdk_v5_1_0_36092/nrf51822/Include/gcc -I../ -I/Users/brian/Development/nordic/nrf51_sdk_v5_1_0_36092/nrf51822/Include/ -I/Users/brian/Development/nordic/nrf51_sdk_v5_1_0_36092/nrf51822/Include/ble/ -I/Users/brian/Development/nordic/nrf51_sdk_v5_1_0_36092/nrf51822/Include/ble/ble_services/ -I/Users/brian/Development/nordic/nrf51_sdk_v5_1_0_36092/nrf51822/Include/s110 -I/Users/brian/Development/nordic/nrf51_sdk_v5_1_0_36092/nrf51822/Include/app_common/ -I/Users/brian/Development/nordic/nrf51_sdk_v5_1_0_36092/nrf51822/Include/sd_common/ -MD -mthumb -mcpu=cortex-m0 -march=armv6-m -L /Users/brian/Development/nordic/nrf51-pure-gcc-setup/template/ -T gcc_nrf51_s110.ld -Wl,-Map=_build/.Map ../main.c -o main
<command-line>:0:1: error: macro names must be identifiers
make: *** [main] Error 1
I noticed that the two -D
compiler flags aren't showing anything. Are BOARD
and DEVICE
supposed to be environment variables in my shell? And do I need anything else in the pure-gcc
folder besides the Makefile?
Hello, is this repository dead, or do you have official support in the gcc toolchain in the SDK now? How are these makefiles related to eachother?
I hlnd,
Many thanks for you project. It's very usefull to us for quite some times now and works very well.
Except I've got this bug on ubuntu where character expansion from the flash makefile target that writes the jlink flash command file does not get expanded.
I'm talking more precisely about this snippet:
flash.jlink:
echo "r\nloadbin $(BIN) $(FLASH_START_ADDRESS)\nr\ng\nexit\n" > flash.jlink
When I look at the result of this on my OSX machine, the flash.jlink file contains
flap:ancs fmorin$ cat flash.jlink
r
loadbin _build/application_s110.bin
r
g
exit
Which is OK, but when I do the same thing on ubuntu, the flash.jlink file contains:
$ cat flash.jlink
r\nloadbin _build/application_s110.bin\nr\ng\nexit\n
I tried looking on google about this but luck yet.
Thanks for your help !
Have you been able to compile any of the example BLE applications with this template? I found I had to add additional SOURCE_PATHS and INCLUDE_PATHS defines if USE_BLE was used (app_common, sd_common, ble, ble/ble_services, etc.) and even then once I finally got far enough along that it looked like it was going to work, the BLE source files would fail from what looks like missing/incorrect includes...
e.g. device_manager.c won't build because it has no idea what ble_gap_sec_keyset_t is since it the s110 softdevice header doesn't have it, but the s120 includes do.
I compiled and ran the blinky_test using the pure-gcc setup. However when I do the same for the ble_app_hrs it does not seem to work
I have followed the given steps:
1-flash a softdevice onto the board using make flash-softdevice SOFTDEVICE=/path/to/version/6
2-Copy the make file in the examples directory:
../main.c:44:28: fatal error: device_manager.h: No such file or directory
#include "device_manager.h"
^
compilation terminated.
make: *** [_build/main.o] Error 1
3: I added the required path as follow to the make file:
LIBRARY_PATHS = "$(SDK_PATH)Include/s110"
LIBRARY_PATHS += "$(SDK_PATH)Include/ble"
LIBRARY_PATHS += "$(SDK_PATH)Include/ble/device_manager"
LIBRARY_PATHS += "$(SDK_PATH)Include/ble/ble_services"
LIBRARY_PATHS += "$(SDK_PATH)Include/app_common"
LIBRARY_PATHS += "$(SDK_PATH)Include/sd_common"
LIBRARY_PATHS += "$(SDK_PATH)Include/sdk"
LIBRARY_PATHS += "/home/username/Desktop/nordic/nrf51_sdk_v6_0_0_43681/nrf51822/Include/ble/device_manager"
4.Now I end up with this error:
make: *** No rule to make target _build/ble_bondmngr.o', needed by
all'. Stop.
SO I added these 4 paths as source files:
SOURCE_PATHS += $(SDK_PATH)Source/ble
SOURCE_PATHS += $(SDK_PATH)Source/ble/device_manager
SOURCE_PATHS += $(SDK_PATH)Source/app_common
SOURCE_PATHS += $(SDK_PATH)Source/sd_common
It still throws the same error. Could you please help me out?
The S130 SD was released recently and I was hoping to use it in a project (where my nRF51822 boards would act in both central and peripheral roles -- I think S130 is the only wy to do this). Is there any way to use your pure gcc setup with S130?
Hi
i am not able write my application after I flashed the SD. I am using Jlinker lite (the one that comes with the Dev kit) and the scripts from the nrf pure gcc. I modified the LD script to accommodate the new flash entry point FLASH (rx) : ORIGIN = 0x15000, LENGTH = 0x2b000 and RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 0x2000. I am able to write the SD to the chip the I am not able to write my app. The error is :
****** Error: Failed to prepare for programming.
Failed to download RAMCode!
Thanks
First line has bug with prior user's specific pathname
TOOLCHAIN_PATH ?= $(HOME)/Nedlastinger/gcc-arm-none-eabi-4_7-2013q3/bin/
I'm almost certain it's something I've buggered up but I can't seem to figure it out.
I've installed the SDK, I've pointed SDK_PATH over to it ( $(HOME)/Keil/ARM/Device/Nordic/nrf58122 ) and got the toolchain path set up correctly. I'm just using the blinky_example from the SDK for now.
gcc goes to build the first of the source files and explodes because the SDK headers can't find core_cm0.h. Now I do have core_cm0.h, but it's not in the SDK path. I see it in Keil/ARM/Pack/ARM/CMSIS/3.20.3/CMSIS/Include/core_cm0.h. The Readme.md suggests that if I have everything set up correctly I shouldn't have to modify the compiler search paths, so I'm wondering what I've done wrong.
Did I mis-install the SDK?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.