Re: srodata section alignment issue in hw/bsp/hifive1/hilive1.ld file

2022-08-24 Thread Marko Kiiskila
There was no attached file, I assume that would’ve had the error you are seeing. Regardless, what you have there is a reasonable way to get .data padded to 8 byte alignment. Linker script is the right place to make that happen. > On 24. Aug 2022, at 18.08, 范姜徐霖 wrote: > > I try to port ble_app

Re: Cortex-M hardware stack limit checking

2019-11-27 Thread Marko Kiiskila
Option 3 sounds best to me as well. > On 26 Nov 2019, at 18.36, Łukasz Rymanowski > wrote: > > option 3 looks good to me: +1 > > Best > Łukasz > > On Mon, 25 Nov 2019 at 21:11, Jerzy Kasenberg > wrote: >> >> HI, >> >> I vote for option 3 >> >> My reason, apart what Andrzej mentioned

Re: Thoughts on deprecating LOG_VERSION 2 and making the default LOG_VERSION 3

2019-11-08 Thread marko kiiskila
> On 7 Nov 2019, at 16.50, Christopher Collins wrote: > > On Thu, Nov 07, 2019 at 11:56:36AM -0800, Vipul Rahane wrote: >> Hello, >> >> LOG_VERSION 2 has been around for quite some time but is mostly just a >> string based log. LOG_VERSION 3 supports string based logs as well as >> others.

Re: Removed SUCCESS and FAIL #define statements in LoRa Node's utilities.h

2019-10-17 Thread marko kiiskila
Hi Frank, It’s all good. Thanks for the PR. > On 16 Oct 2019, at 23.08, Frank wrote: > > Hi all, > > following Marko's advice, I just created a PR > > https://github.com/apache/mynewt-core/pull/2047 > > to remove the SUCCESS and FAIL #define statements in >

Re: Earlier check whether to include LORA_NODE_CLI in lora_cli.c

2019-10-16 Thread marko kiiskila
Thanks for noticing. Opened this PR for it: https://github.com/apache/mynewt-core/pull/2044 We do recommend creating PRs for the fixes; those are easier to bring in. https://cwiki.apache.org/confluence/display/MYNEWT/Submitting+Pull+Requests

Re: Unifying Newtmgr (NMP) protocol and MCUmgr (SMP) into the MCUmgr repo

2019-10-10 Thread marko kiiskila
Sorry for being difficult here, but.. To be exact nmgr_uart came after newtmgr-over-shell. The reason it came to be was smaller memory footprint platforms, and assumption was that folks might still want option to newtmgr-over-uart after their dev was done. It got picked up for serial bootloader

Re: Newt feature: run custom commands at build time

2019-09-25 Thread marko kiiskila
> On 24 Sep 2019, at 20.14, Christopher Collins wrote: > > Hi Marko, > > On Tue, Sep 24, 2019 at 03:19:24PM +0300, marko kiiskila wrote: >> Thanks, this is a very useful feature. >> >>> On 24 Sep 2019, at 3.50, Christopher Collins wrote: >>>

Re: Newt feature: run custom commands at build time

2019-09-24 Thread marko kiiskila
Thanks, this is a very useful feature. > On 24 Sep 2019, at 3.50, Christopher Collins wrote: > ... > > A package specifies custom commands in its `pkg.yml` file. There are > two types of commands: 1) pre_cmds (run before the build), and 2) > post_cmds (run after the build). > > ### EXAMPLE

fs/fcb2 API

2019-09-09 Thread marko kiiskila
Hi, I was going to rename API elements under fs/fcb2 to have ‘fcb2’ prefix instead of current ‘fcb’. Currently the namespace is the same as it is for fs/fcb, even though the API is not the same. Let me know if you’re already using FCB2, and still need to have the existing API available in

Re: [VOTE] Release Apache Mynewt 1.7.0-rc1 and Apache NimBLE 1.2.0-rc1

2019-07-19 Thread marko kiiskila
+1 > On 19 Jul 2019, at 16.36, Miguel Azevedo wrote: > > +1 (binding) > > On Fri, 19 Jul 2019, 14:19 Fabio Utzig, wrote: > >> On Fri, Jul 19, 2019, at 9:37 AM, Szymon Janc wrote: >>> Hello all, >>> >>> I am pleased to be calling this vote for the source release of >>> Apache Mynewt 1.7.0

Re: Mynewt load command query

2019-06-17 Thread marko kiiskila
> On 16 Jun 2019, at 7.29, Asmita Jha wrote: > > > > Hello, > > I am working on Real-time location system using MDEK1001 kit. I am > successfully able to do things with the already built firmware image that > has come with the board. I am now trying to implement using my newt as given > on

Re: Adding a callback before asm("bkpt") in the assert function and hal_system_reset()

2019-05-03 Thread marko kiiskila
is in the debug > state. > > On Fri, May 3, 2019 at 2:37 AM marko kiiskila wrote: > >> You can execute stuff within gdb when it hits a breakpoint. >> >> function hook-stop gets called when you stop in debugger. >> hook-run and hook-continue execute if you ‘run’ or ‘conti

Re: Adding a callback before asm("bkpt") in the assert function and hal_system_reset()

2019-05-03 Thread marko kiiskila
You can execute stuff within gdb when it hits a breakpoint. function hook-stop gets called when you stop in debugger. hook-run and hook-continue execute if you ‘run’ or ‘continue’ from debugger, respectively. define hook-stop handle SIGALRM nopass end define hook-run handle SIGALRM pass end

Re: Blinky targets do not load

2019-01-28 Thread marko kiiskila
Hi Simon, I have a source tree of openocd 0.10 with that capability. And I have built versions for Linux/MacOS as well, although you probably don’t want those. Let me know if you want me to send the source tarball. I should be able to generate a patch file out of it too. Bummer that the

***UNCHECKED*** Re: msec and nsec delay in mynewt OS

2018-09-19 Thread marko kiiskila
> On Sep 19, 2018, at 4:48 PM, Rohit Gujarathi wrote: > > Hello all, > > I am new to mynewt OS and was wondering whats the most optimised way to get > accurate msec and nsec delay. > > I want to be able to call this delay in libraries as well. > E.g.:

Re: Getting involved ...

2018-09-17 Thread marko kiiskila
> On Sep 16, 2018, at 7:11 PM, Andrew Eliasz wrote: > > myNewtOS looks most interesting. > I would like to get involved ... and, in particular, > I would like to start with building some simple applications for the > BBC:Microbit > which is supported. Welcome. > Are there any really simple

Re: Mynewt crash when releasing semaphore

2018-08-31 Thread marko kiiskila
486 0x2000af60: 0x0001c38d > 000486 0x2000af74: 0x0001c509 > 000486 0x2000af88: 0x0001c54d > 000486 0x2000af9c: 0x0001c38d > 000486 0x2000afb0: 0x0001c509 > > >> On 31-Aug-2018, at 5:21 PM, marko kiiskila wrote: >> >> Some suggestions (inline). >>

Re: Mynewt crash when releasing semaphore

2018-08-31 Thread marko kiiskila
(void) _copy(s, sizeof(t), t, sizeof(t)); > 156 } > 157 > 158 int tc_aes_encrypt(uint8_t *out, const uint8_t *in, const > TCAesKeySched_t s) > 159 { > 160 uint8_t state[Nk*Nb]; That could be writing that random looking data in the stack. encrypted data should lo

Re: Mynewt crash when releasing semaphore

2018-08-31 Thread marko kiiskila
epos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/src/hal_system.c:50 > #1 0xbf2e in os_default_irq (tf=0x2000ffc8) at > repos/apache-mynewt-core/kernel/os/src/arch/cortex_m4/os_fault.c:170 > #2 0xda56 in os_default_irq_asm () at > repos/apache-mynewt-core/kernel/os/src/arch/cortex_m4/

Re: I2C retries

2018-08-30 Thread marko kiiskila
> On Aug 30, 2018, at 7:21 PM, Christopher Collins wrote: > > On Wed, Aug 29, 2018 at 10:06:37PM -0500, Greg Stein wrote: >> On Wed, Aug 29, 2018 at 8:59 PM Christopher Collins >> wrote: >> >>> Hello all, >>> >>> I noticed the HAL master I2C API does not include any retry logic. As >>>

Re: debounce/debounce.h

2018-08-28 Thread marko kiiskila
checking if another one > already existed. I'll come up with a new name for util/debounce today > and submit a PR. > > Chris > > On Tue, Aug 28, 2018 at 05:33:22PM +0300, marko kiiskila wrote: >> mynewt-core has 2 debounce packages. Trying to include both packages >>

debounce/debounce.h

2018-08-28 Thread marko kiiskila
mynewt-core has 2 debounce packages. Trying to include both packages within a project is giving me trouble. I think one should be renamed. Which one? [marko@IsMyLaptop:~/src2/incubator-mynewt-blinky/repos/apache-mynewt-core]$ find . -name debounce.h

Re: CBOR Decoding problem

2018-08-13 Thread marko kiiskila
object. Hence the struct c_object > creation.. If I make CborAttrArrayType > > Am not sure that will work. > > Please correct me if am wrong. > > Thanks, > Aditya Xavier. > > > >> On 13-Aug-2018, at 12:53 PM, marko kiiskila wrote: >> >> “c&qu

Re: FCB revamp

2018-07-30 Thread marko kiiskila
adding mechanisms to detect corruption of length field, for example, starts to get complicated and costly. Recovery is easier to do, however, if we use a stronger version of CRC. I.e. if CRC does not match, then just go forward a byte at a time until it does. > > Kind regards, > > Jehud

Re: FCB revamp

2018-07-26 Thread marko kiiskila
> On Jul 26, 2018, at 3:10 PM, marko kiiskila wrote: > > Hi, > > there’s few issues with FCB which I need to fix. > > 1) Compressing flash sector in the middle of write. > Currently the cycle of operation is expected to be the following: > fcb_append()

FCB revamp

2018-07-26 Thread marko kiiskila
Hi, there’s few issues with FCB which I need to fix. 1) Compressing flash sector in the middle of write. Currently the cycle of operation is expected to be the following: fcb_append() -> get offset to write data to flash_area_write() -> write data fcb_append_finish() -> writes CRC etc This is

Re: newtmgr fs command fails in sim

2018-07-06 Thread marko kiiskila
> On Jul 6, 2018, at 5:49 PM, Kevin Townsend wrote: > > Hi Chris, >> The error codes that come back in newtmgr responses are always (or at >> least should be) MGMT_ERR codes: >>

Re: 1 Wire HAL

2018-07-03 Thread marko kiiskila
gt; be configured via the syscfg.yml file (timer+GPIO or something else like UART > if you have one free)? > > Kevin > > > On 03/07/18 12:07, marko kiiskila wrote: >> Sounds like a candidate for driver interface, not HAL. I agree with Miguel. >> User could pick the implementat

Re: 1 Wire HAL

2018-07-03 Thread marko kiiskila
Sounds like a candidate for driver interface, not HAL. I agree with Miguel. User could pick the implementation which uses UART, or one which uses hal_timer with hal_gpio. However; Sam, you don’t think a generic driver interface makes sense? If you had driver package which implemented an API

Re: Linking of tests when app itself has a main

2018-06-27 Thread marko kiiskila
Hi René, unittest framework was developed assuming that apps themselves would not have test suites. Only individual packages/libraries. So the method you described is pretty much what you’d need to do. Or alternatively create a library out of the components you want to create unittests for. >

Re: config id package usage

2018-06-22 Thread marko kiiskila
e 4 of the 32bit uicr registers on a > nordic which I guess is what Id naively argue for. How are others doing > serials these days? Is there an existing proprietary/open backend for > serial generation that we could keep in mind? I saw that bitmark thing > recently. > > > On Mo

Re: OC_SERVER

2018-06-21 Thread marko kiiskila
ideas? > > Regards, > jan > > > > Am 21.06.2018 um 22:14 schrieb marko kiiskila: >>> On Jun 21, 2018, at 10:59 AM, marko kiiskila wrote: >>> >>>> On Jun 21, 2018, at 2:19 AM, Jan Clement >>>> wrote: >>>> >>>

Re: OC_SERVER

2018-06-21 Thread marko kiiskila
> On Jun 21, 2018, at 10:59 AM, marko kiiskila wrote: > >> On Jun 21, 2018, at 2:19 AM, Jan Clement >> wrote: >> >> Hello you All, >> >> at the moment I am stuck at connecting to the oic server via newtmgr over >> udp. the connection work

Re: config id package usage

2018-06-18 Thread marko kiiskila
Maybe the bsp/mcu itself can just register a config like "bsp/serial", > "bsp/custom1" instead of us trying to infinitely extend the id package for > custom nvmic functions That, while possible, I would not use. I want to find the identifying pieces of info from the same pla

Re: [DISCUSS] Release Apache Mynewt 1.4.0-rc1 and Apache NimBLE 1.0.0-rc1

2018-06-08 Thread marko kiiskila
SHA files in the release directory should identify the type of checksum calculated, i.e. should end with .sha512, not with .sha. Otherwise, checksums and signatures verify ok. > On Jun 8, 2018, at 11:44 AM, Szymon Janc wrote: > > Hi Jacob, > > On Thursday, 7 June 2018 18:09:44 CEST Jacob

Re: rfc (stm32) pin descriptor, AF encoding

2018-05-14 Thread marko kiiskila
Quite clever, I like this idea. This will allow us to simplify all peripheral structures for STM32s a bit. > On May 14, 2018, at 2:32 PM, Fabio Utzig wrote: > > I like the proposed changes! > > Fabio > > On Sun, May 13, 2018, at 1:02 AM, markus wrote: >> For the pwm driver I

Re: Console Read Issue

2018-04-21 Thread marko kiiskila
, > Aditya Xavier. > > >> On 21-Apr-2018, at 8:44 PM, Aditya Xavier <adityaxav...@me.com> wrote: >> >> Could you specifically point how to use the uart driver interface? >> >> I’ll look at how to base64 encode as well.. >> >> Sent fro

Re: Debugging the mynewt bootloader

2018-04-19 Thread marko kiiskila
Just reset the target; it’ll restart from the beginning. Presumably the bootloader will do the same work every time it runs? ‘mon reset’ is what you’d issue from gdb prompt. You can enable console within bootloader, if absolutely necessary. Replace the console/stub package with console/full, and

Re: Retained Register Interface (also, hi!)

2018-04-03 Thread marko kiiskila
Hi Alvaro, I’d recommend a new API in HAL. One where register contents will survive reset, depending on the type of reset. Have #define HAL_RETAIN_REG_MAX XXX in some MCU specific header file. And then in hal/hal_retain_reg.h #ifnfdef HAL_RETAIN_REG_MAX #define HAL_RETAIN_REG_MAX 0 #endif

Re: Move driver _shell_init into driver pkg.init instead of app main

2018-03-01 Thread marko kiiskila
+1 on using sysinit > On Mar 1, 2018, at 6:18 PM, Jacob Rosenthal wrote: > > shell_init in the app feels odd. > https://github.com/apache/mynewt-core/blob/master/apps/sensors_test/src/main.c#L411 > > It feels like they should be down in the drivers pkg.init, especially

Re: JSON Encoding and Decoding

2018-02-28 Thread marko kiiskila
json_encode_object_finish(module); > } > > json_encode_array_finish(encoder); > json_encode_object_finish(encoder); > > > >> On 28-Feb-2018, at 1:18 PM, marko kiiskila <ma...@runtime.io> wrote: >> >> Hi Aditya, >> >

Re: JSON Encoding and Decoding

2018-02-27 Thread marko kiiskila
Hi Aditya, > On Feb 28, 2018, at 9:26 AM, Aditya Xavier wrote: > > HI Mynewt Team, > > Wanted some assistance on how to encode and decode the following JSON > string. > > {“name1":1,”name2”:"value2”,"name3":[{“name4":1,”name5":5}]} > > Because of

Re: mynewt OS Shell over BLE?

2017-12-09 Thread marko kiiskila
So one idea would be to use the UART service for BLE. We don’t have this, but I’d like us to. I think I’ve mentioned this earlier, but there have not been takers to implement this yet. UART service which is actually console backend. It’s sort of a standard service, so this might show up as a tty

Re: newt load hang

2017-12-07 Thread marko kiiskila
> On Dec 6, 2017, at 11:14 AM, mostafa.ud...@gmail.com wrote: > >> Make sure that that old version of process JLinkExe is not running anymore. >> Sometimes that process fails to exit, and if it’s still there, it’s >> going to get in >> the way of ‘newt load’/‘newt debug’. >> >>

Re: newt load hang

2017-12-06 Thread marko kiiskila
Try running JLinkExe manually, see if that thing connects ok. I think we invoke something like this: JLinkExe -device nRF52 -speed 4000 -if SWD > On Dec 6, 2017, at 11:21 AM, mostafa.ud...@gmail.com <muddi...@odu.edu> wrote: > > > > On 2017-12-06 11:53, marko kiisk

Re: [VOTE] Release Apache Mynewt 1.3.0-rc1

2017-12-01 Thread marko kiiskila
> On Dec 1, 2017, at 1:29 PM, Christopher Collins wrote: > > On Thu, Nov 30, 2017 at 10:10:00PM -0200, Fabio Utzig wrote: > [...] >> [X] +1 Release this package >> [ ] 0 I don't feel strongly about it, but don't object >> [ ] -1 Do not release this package because... > > +1

Re: Cannot build lora_app_shell

2017-11-29 Thread marko kiiskila
I don’t think the system is even booting properly. If you run it under debugger, can you verify that you’re not reaching main()? Here’s few things that you should look at: TIMER_4 does not exist with the BSP you’re using. So you could try adjusting LORA_MAC_TIMER_NUM to 3, and saying TIMER_3=1,

Re: Mutex oddities with v1.0.0

2017-11-06 Thread marko kiiskila
s only checked when os_task_remove() is called. It was added to safeguard user from deleting a task which is still holding locks. Given the nature of semaphores, we probably cannot do this for that style lock. I think we should remove that from os_sem_XXX() calls. > > Jitesh > > On Mo

Re: Mutex oddities with v1.0.0

2017-11-06 Thread marko kiiskila
I’d start by looking for memory corruption. You could try adding guard variables around your send_mutex(), and see if anything stomps on them. Another option could be to change mutex_release() to write something other than 0 at mu_owner, and then add a conditional hardware watchpoint which looks

Re: [mynewt-newtmgr] 01/01: Merge pull request #46 from mkiiskila/lora

2017-10-27 Thread marko kiiskila
Probably should’ve mentioned: this code does do fragmentation/reassembly to fit into lora frames (which might be quite limited). > On Oct 27, 2017, at 1:40 PM, marko kiiskila <ma...@runtime.io> wrote: > > Hi, > > added CoAP over LoRa option when running on Multitech gat

Fwd: [mynewt-newtmgr] 01/01: Merge pull request #46 from mkiiskila/lora

2017-10-27 Thread marko kiiskila
Hi, added CoAP over LoRa option when running on Multitech gateway. root@mtcdt:~# ./newtmgr conn show mt Connection profiles: mt: type=oic_mtech, connstring='' root@mtcdt:~# ./newtmgr -c mt -t 120 --name 00-13-50-04-04-50-13-00 taskstat task pri tid runtime cswstksz stkuse

Re: BLE + LoRa

2017-10-05 Thread marko kiiskila
RF signal leaking to one of the debug cables, and then that acts as an antenna? Is the frequency difference between actual signal and ‘shadow’ always the same, or about the same? Do you see the ‘shadow’ ever come before the frame with good RSSI? I don’t know where the time stamping happens, but

Re: task stack initialisation change proposal

2017-09-14 Thread marko kiiskila
+1 from me. After merging this, I’d also want to change the native target stack initialization to do same thing (as that has similar alignment restrictions). > On Sep 14, 2017, at 3:33 AM, Julian Ingram wrote: > > Hi All, > > Currently the stack top and size are

Re: Regarding Arduino M0 zero serial communication implementation

2017-08-29 Thread marko kiiskila
> On Aug 28, 2017, at 11:49 PM, jyoth...@aritron.com wrote: > > On 2017-08-28 17:41, marko kiiskila wrote: >> I just tried it, it worked for me at least. >> Take a look at output from ‘newt target dep ’, make sure you >> seen console/full, as well as shell as li

Re: Regarding Arduino M0 zero serial communication implementation

2017-08-28 Thread marko kiiskila
. > On Aug 27, 2017, at 9:24 PM, jyoth...@aritron.com wrote: > > On 2017-08-25 17:21, Christopher Collins wrote: >> On Fri, Aug 25, 2017 at 09:53:26AM -0700, marko kiiskila wrote: >>> Also note that blinky does not have shell compiled in. It’s a very simple >>>

Re: Best practice for usage of the log_fcb_handler

2017-08-25 Thread marko kiiskila
not going to use sys/config, or NFFS, you can use that space for your logs as well. > > EDV-Beratung Schilken > alf...@schilken.de > www.schilken.de > mobil: +49 178 1475677 > >> Am 25.08.2017 um 19:06 schrieb marko kiiskila <ma...@runtime.io>: >> &

Re: Best practice for usage of the log_fcb_handler

2017-08-25 Thread marko kiiskila
> On Aug 25, 2017, at 9:29 AM, Alfred Schilken wrote: > > Hello, > > I couldn’t find an example usage of the log_fcb_handler and just used the > reboot_log for writing to the 16 kB FLASH_AREA_REBOOT_LOG area. > > This works fine but it a bit dirty. > > Is there a

Re: Regarding Arduino M0 zero serial communication implementation

2017-08-25 Thread marko kiiskila
> On Aug 25, 2017, at 8:39 AM, Christopher Collins wrote: > > Hi Jyothi, > > On Fri, Aug 25, 2017 at 12:10:50PM +, jyoth...@aritron.com wrote: > [...] >> After we run the application, cant able to get the shell prompt as >> mentioned by you through minicom. With Arduino

duplicate BSP under mynewt_nordic repository?

2017-08-17 Thread marko kiiskila
Hi, PWM API and driver for nordic were merged in today (yay for mlaz). In order to make it easy to try out, I’m proposing creating a BSP for nrf52dk under mynewt_nordic. Basically a duplicate one which is present in apache-mynewt-core, but one which enables additional peripherals. Specifically

Re: duplicate repositories mynewt_arduino_zero, mynewt_nordic, mynewt_stm32f3

2017-07-11 Thread marko kiiskila
> On Jul 11, 2017, at 2:53 PM, marko kiiskila <ma...@runtime.io> wrote: > > >> On Jul 11, 2017, at 11:09 AM, Fabio Utzig <ut...@utzig.org> wrote: >> >> On Tue, Jul 11, 2017, at 12:51 PM, Todd Mitton wrote: >>> It would be nice to transfer th

Re: PWM Driver

2017-07-11 Thread marko kiiskila
Hi, > On Jul 10, 2017, at 8:31 PM, Miguel Azevedo wrote: > > I am currently developing a PWM driver for mynewt, more specifically a > driver for nRF52 based hardware. > Therefore I came up with this PWM high level API, which will be > described ahead on this e-mail. > Its

duplicate repositories mynewt_arduino_zero, mynewt_nordic, mynewt_stm32f3

2017-07-10 Thread marko kiiskila
Hi, currently we have these repositories (with almost the same contents), the new one in github.com/runtimeco and old one in github.com/runtimeinc Although from pulling point of view it is somewhat more convenient to users to have

Re: How to use flash circular buffers (FCB)

2017-06-26 Thread marko kiiskila
Hi, > On Jun 26, 2017, at 3:29 AM, Laczen JMS wrote: > > Hi, > > I would like to use flash circular buffers for variable storage and > logging. I am not sure how to initialize and use the buffers. I am working > on a nrf51 system. > > The first use case is storing of data