You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by marko kiiskila <ma...@runtime.io> on 2017/04/20 17:16:30 UTC
dev on Raspberry Pi 3
Hi,
I jotted the major steps to duplicate what I did, in case
there are others interested in this.
1. Download rasbian image
https://www.raspberrypi.org/downloads/raspbian/
and follow instructions on how to get it to microSD card.
2. Boot the system, set up networking.
3. Install golang
https://golang.org/dl/
You can use the binary version built for armv6l.
I used this one: go1.8.1.linux-armv6l.tar.gz
4. Install & build newt
Follow tutorial
http://mynewt.apache.org/latest/faq/go_env
starting from step 2
5. Get blinky
newt new blinky
modify project.yml to use 0-dev (latest from master) as the version.
newt install
6. Change to use sim-armv7 as your architecture
modify the following lines repos/apache-mynewt-core/hw/bsp/native/bsp.yml
bsp.arch: sim-armv7
bsp.compiler: compiler/sim-armv7
7. Build and run 'my_blinky_sim'
newt run my_blinky_sim
—
M
Re: dev on Raspberry Pi 3
Posted by marko kiiskila <ma...@runtime.io>.
That’s good to know, thanks. I assume you’ve set up rest of cross-dev tools with it as well?
The thing I encountered when using Raspberry Pi’s bluetooth with mynewt running as a host
was that the controller was reporting it’s max power as something higher than our
host accepts.
Once I did this:
diff --git a/net/nimble/include/nimble/hci_common.h b/net/nimble/include/nimble/hci_common.h
index ff34316..4387caf 100644
--- a/net/nimble/include/nimble/hci_common.h
+++ b/net/nimble/include/nimble/hci_common.h
@@ -191,7 +191,7 @@ extern "C" {
/* --- LE advertising channel tx power (OCF 0x0007) */
#define BLE_HCI_ADV_CHAN_TXPWR_ACK_PARAM_LEN (2) /* Includes status byte. */
#define BLE_HCI_ADV_CHAN_TXPWR_MIN (-20)
-#define BLE_HCI_ADV_CHAN_TXPWR_MAX (10)
+#define BLE_HCI_ADV_CHAN_TXPWR_MAX (12)
/* --- LE set advertising data (OCF 0x0008) */
#define BLE_HCI_MAX_ADV_DATA_LEN (31)
things started working ok.
I don’t know if we want to get this change to our code base or not?
> On Apr 20, 2017, at 10:49 AM, Kevin Townsend <ke...@adafruit.com> wrote:
>
> Thanks for the notes, very useful. Now that there are multiple cores on the Pi, compiling with GCC is a lot less painful.
>
> There are JLink drivers available for ARM targets now as well, which is nice for this kind of thing. We use the Pi3 for production all the time, flashing boards with the JLink.
>
> Go to https://www.segger.com/downloads/jlink and select 'J-Link Software and Documentation pack for Linux ARM systems'
>
> That will give you JLinkExe as well as GDB server, etc.
>
> Kevin
>
> On 20/04/17 19:16, marko kiiskila wrote:
>> Hi,
>>
>> I jotted the major steps to duplicate what I did, in case
>> there are others interested in this.
>>
>> 1. Download rasbian image
>> https://www.raspberrypi.org/downloads/raspbian/
>> and follow instructions on how to get it to microSD card.
>>
>> 2. Boot the system, set up networking.
>>
>> 3. Install golang
>> https://golang.org/dl/
>> You can use the binary version built for armv6l.
>> I used this one: go1.8.1.linux-armv6l.tar.gz
>>
>> 4. Install & build newt
>> Follow tutorial
>> http://mynewt.apache.org/latest/faq/go_env
>> starting from step 2
>>
>> 5. Get blinky
>> newt new blinky
>> modify project.yml to use 0-dev (latest from master) as the version.
>> newt install
>>
>> 6. Change to use sim-armv7 as your architecture
>> modify the following lines repos/apache-mynewt-core/hw/bsp/native/bsp.yml
>> bsp.arch: sim-armv7
>> bsp.compiler: compiler/sim-armv7
>>
>> 7. Build and run 'my_blinky_sim'
>> newt run my_blinky_sim
>>
>> —
>> M
>
Re: dev on Raspberry Pi 3
Posted by Kevin Townsend <ke...@adafruit.com>.
Thanks for the notes, very useful. Now that there are multiple cores on
the Pi, compiling with GCC is a lot less painful.
There are JLink drivers available for ARM targets now as well, which is
nice for this kind of thing. We use the Pi3 for production all the time,
flashing boards with the JLink.
Go to https://www.segger.com/downloads/jlink and select 'J-Link Software
and Documentation pack for Linux ARM systems'
That will give you JLinkExe as well as GDB server, etc.
Kevin
On 20/04/17 19:16, marko kiiskila wrote:
> Hi,
>
> I jotted the major steps to duplicate what I did, in case
> there are others interested in this.
>
> 1. Download rasbian image
> https://www.raspberrypi.org/downloads/raspbian/
> and follow instructions on how to get it to microSD card.
>
> 2. Boot the system, set up networking.
>
> 3. Install golang
> https://golang.org/dl/
> You can use the binary version built for armv6l.
> I used this one: go1.8.1.linux-armv6l.tar.gz
>
> 4. Install & build newt
> Follow tutorial
> http://mynewt.apache.org/latest/faq/go_env
> starting from step 2
>
> 5. Get blinky
> newt new blinky
> modify project.yml to use 0-dev (latest from master) as the version.
> newt install
>
> 6. Change to use sim-armv7 as your architecture
> modify the following lines repos/apache-mynewt-core/hw/bsp/native/bsp.yml
> bsp.arch: sim-armv7
> bsp.compiler: compiler/sim-armv7
>
> 7. Build and run 'my_blinky_sim'
> newt run my_blinky_sim
>
> \u2014
> M