Re: Regarding split images

2019-05-04 Thread joseph reveane
Hi Chris,

Here are the commands outputs:
*$ newt info*
*Repository info:*
** apache-mynewt-core: eb1d3ec0f486d92887586f60d87f0bb916188515, 1.6.0
(dirty: local changes)*
** apache-mynewt-nimble: 223714cb16c255cfa701929c0de6d7579bfd2cdd,
1.1.0*







*$ newt target show split-apptargets/split-app
app=@apache-mynewt-core/apps/splitty
bsp=@apache-mynewt-core/hw/bsp/nordic_pca20020
build_profile=optimizedloader=@apache-mynewt-nimble/apps/bleprph
syscfg=BLE_LL_CFG_FEAT_LE_ENCRYPTION=0:BLE_SM_LEGACY=0*

It sounds that we're not using the same release of the newt repos...

Regards.

/joseph

Le ven. 3 mai 2019 à 23:21, Christopher Collins  a écrit :

> On Thu, May 02, 2019 at 11:05:11AM +0200, joseph reveane wrote:
> > Hi Chris,
> >
> > I've just tried your latest fix and I still get the same error:
> >
> > *Error: Two app packages in build: apps/splitty, apps/bleprph*
>
> Huh... I am really not sure.  I believe I am using the same target as
> you.  Using the two newt fixes I mentioned earlier (since merged to
> master), I am able to build this target.  Here is my output:
>
> [ccollins@ccollins:~/proj/myproj]$ newt info
> Repository info:
> * apache-mynewt-core: 77f75d4bd389d38c3022b815e8684ff49a35ff2f,
> 0.0.0
> * apache-mynewt-nimble: 976bb8f84bf9547efdea444ae79a62d5a355a613,
> 0.0.0
>
> [ccollins@ccollins:~/proj/myproj]$ newt target show splitty-nrf52dk
> targets/splitty-nrf52dk
> app=@apache-mynewt-core/apps/splitty
> bsp=@apache-mynewt-core/hw/bsp/nordic_pca20020
> build_profile=optimized
> loader=@apache-mynewt-nimble/apps/bleprph
> syscfg=BLE_LL_CFG_FEAT_LE_ENCRYPTION=0:BLE_SM_LEGACY=0
>
> [ccollins@ccollins:~/proj/myproj]$ newt build splitty-nrf52dk
> Building target targets/splitty-nrf52dk
> [...]
> Target successfully built: targets/splitty-nrf52dk
>
> Could you please execute the following two commands and send the output?
>
> newt info
> newt target show 
>
> Thanks,
> Chris
>
> >
> > Regards.
> >
> > /joseph
> >
> > Le mer. 1 mai 2019 à 20:35, Christopher Collins  a
> écrit :
> >
> > > Hi Joseph,
> > >
> > > On Mon, Apr 29, 2019 at 04:39:50PM +0200, joseph reveane wrote:
> > > > Hi Chris,
> > > >
> > > > I've modified my app setup to point to the  nimble repo:
> > > >
> > > > *$ newt target show split-apptargets/split-app
> > > > app=@apache-mynewt-core/apps/splitty
> > > > bsp=@apache-mynewt-core/hw/bsp/nordic_pca20020
> > > > build_profile=optimizedloader=@apache-mynewt-nimble/apps/bleprph
> > > > syscfg=BLE_LL_CFG_FEAT_LE_ENCRYPTION=0:BLE_SM_LEGACY=0*
> > > >
> > > > Then I've treid to build it:
> > >
> > > [...]
> > >
> > > It seems split image support is indeed broken.  I still cannot get the
> > > same error message as you, but I encountered a different error when I
> > > tried using your target.
> > >
> > > I believe I have fixed this second issue.  The PR is here:
> > > https://github.com/apache/mynewt-newt/pull/295.  Could you please give
> > > it a shot and let me know if it works?
> > >
> > > Thanks,
> > > Chris
> > >
>


Re: Regarding split images

2019-05-03 Thread Christopher Collins
On Thu, May 02, 2019 at 11:05:11AM +0200, joseph reveane wrote:
> Hi Chris,
> 
> I've just tried your latest fix and I still get the same error:
> 
> *Error: Two app packages in build: apps/splitty, apps/bleprph*

Huh... I am really not sure.  I believe I am using the same target as
you.  Using the two newt fixes I mentioned earlier (since merged to
master), I am able to build this target.  Here is my output:

[ccollins@ccollins:~/proj/myproj]$ newt info
Repository info:
* apache-mynewt-core: 77f75d4bd389d38c3022b815e8684ff49a35ff2f, 0.0.0
* apache-mynewt-nimble: 976bb8f84bf9547efdea444ae79a62d5a355a613, 0.0.0

[ccollins@ccollins:~/proj/myproj]$ newt target show splitty-nrf52dk
targets/splitty-nrf52dk
app=@apache-mynewt-core/apps/splitty
bsp=@apache-mynewt-core/hw/bsp/nordic_pca20020
build_profile=optimized
loader=@apache-mynewt-nimble/apps/bleprph
syscfg=BLE_LL_CFG_FEAT_LE_ENCRYPTION=0:BLE_SM_LEGACY=0

[ccollins@ccollins:~/proj/myproj]$ newt build splitty-nrf52dk
Building target targets/splitty-nrf52dk
[...]
Target successfully built: targets/splitty-nrf52dk

Could you please execute the following two commands and send the output?

newt info
newt target show 

Thanks,
Chris

> 
> Regards.
> 
> /joseph
> 
> Le mer. 1 mai 2019 à 20:35, Christopher Collins  a écrit :
> 
> > Hi Joseph,
> >
> > On Mon, Apr 29, 2019 at 04:39:50PM +0200, joseph reveane wrote:
> > > Hi Chris,
> > >
> > > I've modified my app setup to point to the  nimble repo:
> > >
> > > *$ newt target show split-apptargets/split-app
> > > app=@apache-mynewt-core/apps/splitty
> > > bsp=@apache-mynewt-core/hw/bsp/nordic_pca20020
> > > build_profile=optimizedloader=@apache-mynewt-nimble/apps/bleprph
> > > syscfg=BLE_LL_CFG_FEAT_LE_ENCRYPTION=0:BLE_SM_LEGACY=0*
> > >
> > > Then I've treid to build it:
> >
> > [...]
> >
> > It seems split image support is indeed broken.  I still cannot get the
> > same error message as you, but I encountered a different error when I
> > tried using your target.
> >
> > I believe I have fixed this second issue.  The PR is here:
> > https://github.com/apache/mynewt-newt/pull/295.  Could you please give
> > it a shot and let me know if it works?
> >
> > Thanks,
> > Chris
> >


Re: Regarding split images

2019-05-02 Thread joseph reveane
Hi Chris,

I've just tried your latest fix and I still get the same error:

*Error: Two app packages in build: apps/splitty, apps/bleprph*

Regards.

/joseph

Le mer. 1 mai 2019 à 20:35, Christopher Collins  a écrit :

> Hi Joseph,
>
> On Mon, Apr 29, 2019 at 04:39:50PM +0200, joseph reveane wrote:
> > Hi Chris,
> >
> > I've modified my app setup to point to the  nimble repo:
> >
> > *$ newt target show split-apptargets/split-app
> > app=@apache-mynewt-core/apps/splitty
> > bsp=@apache-mynewt-core/hw/bsp/nordic_pca20020
> > build_profile=optimizedloader=@apache-mynewt-nimble/apps/bleprph
> > syscfg=BLE_LL_CFG_FEAT_LE_ENCRYPTION=0:BLE_SM_LEGACY=0*
> >
> > Then I've treid to build it:
>
> [...]
>
> It seems split image support is indeed broken.  I still cannot get the
> same error message as you, but I encountered a different error when I
> tried using your target.
>
> I believe I have fixed this second issue.  The PR is here:
> https://github.com/apache/mynewt-newt/pull/295.  Could you please give
> it a shot and let me know if it works?
>
> Thanks,
> Chris
>


Re: Regarding split images

2019-05-01 Thread Christopher Collins
Hi Joseph,

On Mon, Apr 29, 2019 at 04:39:50PM +0200, joseph reveane wrote:
> Hi Chris,
> 
> I've modified my app setup to point to the  nimble repo:
> 
> *$ newt target show split-apptargets/split-app
> app=@apache-mynewt-core/apps/splitty
> bsp=@apache-mynewt-core/hw/bsp/nordic_pca20020
> build_profile=optimizedloader=@apache-mynewt-nimble/apps/bleprph
> syscfg=BLE_LL_CFG_FEAT_LE_ENCRYPTION=0:BLE_SM_LEGACY=0*
> 
> Then I've treid to build it:

[...]

It seems split image support is indeed broken.  I still cannot get the
same error message as you, but I encountered a different error when I
tried using your target.

I believe I have fixed this second issue.  The PR is here:
https://github.com/apache/mynewt-newt/pull/295.  Could you please give
it a shot and let me know if it works?

Thanks,
Chris


Re: Regarding split images

2019-04-29 Thread joseph reveane
Hi Chris,

I've modified my app setup to point to the  nimble repo:







*$ newt target show split-apptargets/split-app
app=@apache-mynewt-core/apps/splitty
bsp=@apache-mynewt-core/hw/bsp/nordic_pca20020
build_profile=optimizedloader=@apache-mynewt-nimble/apps/bleprph
syscfg=BLE_LL_CFG_FEAT_LE_ENCRYPTION=0:BLE_SM_LEGACY=0*

Then I've treid to build it:

































*newt build split-appBuilding target targets/split-apppanic: Resolver lacks
mapping for seed package @apache-mynewt-nimble/nimble/controllergoroutine 1
[running]:mynewt.apache.org/newt/newt/resolve.(*Resolver).pruneOrphans(0xc0001f11e0
,
0xc00055e240, 0xc000161300, 0x0)
/tmp/mynewt.XX0GkgW8XL/src/mynewt.apache.org/newt/newt/resolve/resolve.go:812

+0x317mynewt.apache.org/newt/newt/resolve.(*Resolver).resolveHardDepsOnce(0xc0001f11e0
,
0x1, 0x0, 0x0)
/tmp/mynewt.XX0GkgW8XL/src/mynewt.apache.org/newt/newt/resolve/resolve.go:854

+0x11amynewt.apache.org/newt/newt/resolve.(*Resolver).resolveHardDeps(0xc0001f11e0
,
0x80, 0xc000645800)
/tmp/mynewt.XX0GkgW8XL/src/mynewt.apache.org/newt/newt/resolve/resolve.go:878

+0x2bmynewt.apache.org/newt/newt/resolve.(*Resolver).resolveDeps(0xc0001f11e0
,
0xc0001f1248, 0xc9c160, 0xc0006106c0, 0xc000610420, 0x0)
/tmp/mynewt.XX0GkgW8XL/src/mynewt.apache.org/newt/newt/resolve/resolve.go:896

+0x2fmynewt.apache.org/newt/newt/resolve.ResolveFull(0xc000112400
, 0xb,
0x10, 0xc000222000, 0xb, 0xc, 0xc0006106c0, 0xc000610420, 0x0, 0x0, ...)
/tmp/mynewt.XX0GkgW8XL/src/mynewt.apache.org/newt/newt/resolve/resolve.go:1149

+0xd70mynewt.apache.org/newt/newt/builder.(*TargetBuilder).ensureResolved(0xcd8070
,
0x0, 0x0)
/tmp/mynewt.XX0GkgW8XL/src/mynewt.apache.org/newt/newt/builder/targetbuild.go:207

+0x29emynewt.apache.org/newt/newt/builder.(*TargetBuilder).PrepBuild(0xcd8070
,
0xc0001199a0, 0xc000578960)
/tmp/mynewt.XX0GkgW8XL/src/mynewt.apache.org/newt/newt/builder/targetbuild.go:305

+0x43mynewt.apache.org/newt/newt/builder.(*TargetBuilder).Build(0xcd8070
,
0x0, 0xcd8070)
/tmp/mynewt.XX0GkgW8XL/src/mynewt.apache.org/newt/newt/builder/targetbuild.go:474

+0x2fmynewt.apache.org/newt/newt/cli.buildRunCmd(0xcaea00
,
0xc4cf30, 0x1, 0x1, 0x0)
/tmp/mynewt.XX0GkgW8XL/src/mynewt.apache.org/newt/newt/cli/build_cmds.go:161

+0x2bcmynewt.apache.org/newt/newt/cli.AddBuildCommands.func1(0xcaea00
,
0xc4cf30, 0x1, 0x1)
/tmp/mynewt.XX0GkgW8XL/src/mynewt.apache.org/newt/newt/cli/build_cmds.go:434

+0x5fmynewt.apache.org/newt/vendor/github.com/spf13/cobra.(*Command).execute(0xcaea00
,
0xc4cef0, 0x1, 0x1, 0xcaea00, 0xc4cef0)
/tmp/mynewt.XX0GkgW8XL/src/mynewt.apache.org/newt/vendor/github.com/spf13/cobra/command.go:766

+0x2aemynewt.apache.org/newt/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xcae500
,
0x7e5aa4, 0x5, 0x2)
/tmp/mynewt.XX0GkgW8XL/src/mynewt.apache.org/newt/vendor/github.com/spf13/cobra/command.go:852

+0x2c0mynewt.apache.org/newt/vendor/github.com/spf13/cobra.(*Command).Execute(..
.)
/tmp/mynewt.XX0GkgW8XL/src/mynewt.apache.org/newt/vendor/github.com/spf13/cobra/command.go:800

Re: Regarding split images

2019-04-27 Thread Christopher Collins
Hi Joseph,

On Sat, Apr 27, 2019 at 04:01:17PM +0200, joseph reveane wrote:
> Hi Chris,
> 
> I've fetched your fixes and tried to build a split image with the same
> parameters as the
> ones I used to open this issue:
> 
> 1) loader app:
> 
> 
> 
> 
> 
> 
> *newt target show thingy-loadertargets/thingy-loader
> app=@apache-mynewt-core/apps/bleprph
> bsp=@apache-mynewt-core/hw/bsp/nordic_pca20020
> build_profile=optimized
> syscfg=BLE_LL_CFG_FEAT_LE_ENCRYPTION=0:BLE_SM_LEGACY=0*
> 
> 2) user's application:
> 
> 
> 
> 
> 
> 
> 
> *newt target show split-apptargets/split-app
> app=@apache-mynewt-core/apps/splitty
> bsp=@apache-mynewt-core/hw/bsp/nordic_pca20020
> build_profile=optimizedloader=@apache-mynewt-core/apps/bleprph
> syscfg=BLE_LL_CFG_FEAT_LE_ENCRYPTION=0:BLE_SM_LEGACY=0*
> 
> 3) Build output:
> 
> 
> 
> *newt build -v split-appBuilding target targets/split-app2019/04/27
> 15:58:05.226 [WARNING] Transient package @apache-mynewt-core/apps/bleprph
> used, update configuration to use linked package instead
> (@apache-mynewt-nimble/apps/bleprph)Error: Two app packages in build:
> apps/bleprph, apps/splitty*
> 
> So, this must be an other issue than the one you've fixed then...

This looks like a bug involving transient packages.  The package
`@apache-mynewt-core/apps/bleprph` is transient; it is just a link to
the real bleprph (`@apache-mynewt-nimble/apps/bleprph`).

Can you please try changing your target so that its `loader` setting
points to the "real" version of this app (in the nimble repo)?

Thanks,
Chris


Re: Regarding split images

2019-04-26 Thread Christopher Collins
Hi Joseph,

On Sat, Apr 20, 2019 at 09:55:27AM +0200, joseph reveane wrote:
> Hi,
> 
> I'm looking for examples on how to build split and single images for NRF52
> based devices.
> The goal is obviously to get more FLASH room for the application.
> I didn't find any example to build a single image in the Git source tree and
> building a split image as described in the documentation failed for me.
> 
> Thanks in advance for your help.
> Regards.

It seems newt's split image support was broken.  I submitted a fix here:
https://github.com/apache/mynewt-newt/pull/293.  It has not been merged
yet, but you can try it out to see if it solves your issue.

Chris