Date   

Re: Process HCI_UART BLE Connectivity updating FW in the field

Carles Cufi
 

Hi Frank,

 

If you don’t have a debug connection between the iMX and the nRF52832 then you need to use the UART to update the firmware. In order to achieve that you will need to use a bootloader to swap images between 2 banks, because without a debugger that is the usual approach.

MCUboot is an open source bootloader that allows you to perform firmware upgrade indirectly (i.e. the application that is running receives and stores an image in the second slot and then reboots so that MCUboot swaps it) or directly  using a “recovery mode”: The chip running MCUboot boots into its recovery mode and then listens on the UART for commands which allow for a new image to be uploaded.

 

This is achieve through the BOOT_SERIAL option in MCUboot:

https://github.com/JuulLabs-OSS/mcuboot/blob/master/boot/zephyr/Kconfig#L190

 

Unfortunately it is not very documented at this point, but the idea is that you boot the nRF52832 with a pin set to a value (high or low):

https://github.com/JuulLabs-OSS/mcuboot/blob/master/boot/zephyr/Kconfig#L236

 

and that triggers serial recovery mode, where MCUboot waits for commands on the UART to upload a new image.

 

The tool that can be used to send that image is mcumgr, and the process is almost the same to using mcumgr with indirect firmware upgrade. To install mcumgr:

$ go get github.com/apache/mynewt-mcumgr-cli/mcumgr

 

And then you can create a serial connection profile with it and start uploading images.

 

Carles

 

 

From: Vieren Frank <F.Vieren@...>
Sent: 10 April 2019 09:26
To: devel@...; Cufi, Carles <Carles.Cufi@...>
Subject: Process HCI_UART BLE Connectivity updating FW in the field

 

Hi Carles, all,

 

What is the best way to do a firmware update in the field? What it is possible?

 

So far in the lab, I have a proto board with a nrf52832 chip onboard and also a JTAG connector. The JTAG connector of the proto board is connected to the DEBUG connector of nRF52 DK and is used for flashing the FW.

 

Of course this process is not applicable for field updates.

 

So far I found some documentation on how to proceed when wanting to do the upgrade FW process in the field.

 

Also I want to be sure all the pinning required is present not just for operating the nrf52 as BLE connectivity chip.

The idea is just to connect the nrf52832 with its UART pins to one of the main processor's (IMX6 UL-S) UARTs. And also to have the reset accessible. 

 

I'm wondering is this sufficient, and not having to have other pins to be controllable for the upgrade process?

 

How does the mcuboot fits in this story?

 

Not full understand this statement in the topic that is embedded in this topic.

"No, it's the same UART, but you'll need to reboot into MCUboot's serial recovery mode, update the image and then reboot back into the new image."

 

Thanks in advance, 

 

Best regards,

Frank

  


Re: #bluetoothmesh Help for sending and receiving messages through mesh #bluetoothmesh

paul.leguennec@...
 
Edited

Hi Johan,
Thanks for your quick response.

All application-level messaging with mesh is always in the context of models. I’d suggest familiarising yourself with the Mesh Model Specification to see if any of the standard models suits your needs.
I already have gone through the mesh model spec, but I don't think there is a model that I could use to do what i want. I would like to send a message looking like this : UUID_A, UUID_C, RSSI_C.
I have not found a model that allows me to send a specific message (I might be wrong of course), so I don't know what model or at least what kind a model I could use.
EDIT : I think I will have to create a new model (a vendor model if I am right). I don't know if there is some kind of guide to do so, but there is a vendor model in the onoff_level_lighting_vnd_app that I could rely on it's implementation.

The heartbeat is a mesh transport layer feature. You can find a description of it in section 3.6.7 of the Mesh Profile Specification. The sending and receiving of heartbeat messages is configured using the configuration model, however it sounds like this is not what you are looking for since the heartbeat message is not extensible with any additional payload.Since you say you need periodic sending it sounds like periodic publishing for a model is what you are after (see section 3.7.6.1 in the Mesh Profile specification). Model publishing is also configured using the configuration model.
I did not see this section, thanks for the info.

Zephyr doesn’t support acting as provisioner or a configuration client (except for local configuration), however many of the mesh apps available for phones can do this (e.g. nRF Mesh). Did you have something specific in mind to use as the provisioner and configuration client?
I am using nRF Mesh to act as a provisioner right now.

I’m not sure I understand your question, however it is possible for a Mesh node to listen for other advertising packets, such as those coming from a non-mesh beacon. At the moment we’re missing a clean API for it, so you’d need to modify the scan callback (bt_mesh_scan_cb function) in subsys/bluetooth/host/mesh/adv.c to handle any non-mesh advertisements.
You did understood what I meant. I will look further into it once I will be able send a message in my mesh network.

Regards,
Paul.


Process HCI_UART BLE Connectivity updating FW in the field

frv
 

Hi Carles, all,

What is the best way to do a firmware update in the field? What it is possible?

So far in the lab, I have a proto board with a nrf52832 chip onboard and also a JTAG connector. The JTAG connector of the proto board is connected to the DEBUG connector of nRF52 DK and is used for flashing the FW.

Of course this process is not applicable for field updates.

So far I found some documentation on how to proceed when wanting to do the upgrade FW process in the field.

Also I want to be sure all the pinning required is present not just for operating the nrf52 as BLE connectivity chip.
The idea is just to connect the nrf52832 with its UART pins to one of the main processor's (IMX6 UL-S) UARTs. And also to have the reset accessible. 

I'm wondering is this sufficient, and not having to have other pins to be controllable for the upgrade process?

How does the mcuboot fits in this story?

Not full understand this statement in the topic that is embedded in this topic.
"No, it's the same UART, but you'll need to reboot into MCUboot's serial recovery mode, update the image and then reboot back into the new image."

Thanks in advance, 

Best regards,
Frank
  


Re: #bluetoothmesh Help for sending and receiving messages through mesh #bluetoothmesh

Johan Hedberg
 

Hi Paul,

On 9 Apr 2019, at 17.14, paul.leguennec@stimio.fr wrote:
I am working on a project using Mesh with nrf52 boards. I have 3 boards for now, two of them are in a mesh network (boards A and B) (I will have more later to hava a real mesh network), and the last one is a beacon (board C).
I want to collect C's data on board A, and then sending those data by sending a message to B. It must be done periodically.
I have a few questions.

1. Do I need to use a mesh model to send a message through the mesh ? If yes, how can I use it ? I'm asking this because I felt like I could do otherwise.
All application-level messaging with mesh is always in the context of models. I’d suggest familiarising yourself with the Mesh Model Specification to see if any of the standard models suits your needs.

2. It looks like I could use hearbeat message to send this message, but I'm not sure if I to use it. Could I have some explanation on how the heartbeat works, and on where it publish ?
The heartbeat is a mesh transport layer feature. You can find a description of it in section 3.6.7 of the Mesh Profile Specification. The sending and receiving of heartbeat messages is configured using the configuration model, however it sounds like this is not what you are looking for since the heartbeat message is not extensible with any additional payload.

Since you say you need periodic sending it sounds like periodic publishing for a model is what you are after (see section 3.7.6.1 in the Mesh Profile specification). Model publishing is also configured using the configuration model.

Zephyr doesn’t support acting as provisioner or a configuration client (except for local configuration), however many of the mesh apps available for phones can do this (e.g. nRF Mesh). Did you have something specific in mind to use as the provisioner and configuration client?

3. Is it possible for the beacon to be in BLE and not a part of the mesh network ? I mean that I don't know if I can use BLE and Mesh in one node (for A and B) in order to scan for beacons to collect data and then send a message with the data collected.
I’m not sure I understand your question, however it is possible for a Mesh node to listen for other advertising packets, such as those coming from a non-mesh beacon. At the moment we’re missing a clean API for it, so you’d need to modify the scan callback (bt_mesh_scan_cb function) in subsys/bluetooth/host/mesh/adv.c to handle any non-mesh advertisements.

Johan


#bluetoothmesh Help for sending and receiving messages through mesh #bluetoothmesh

paul.leguennec@...
 

Hello,

I am working on a project using Mesh with nrf52 boards. I have 3 boards for now, two of them are in a mesh network (boards A and B) (I will have more later to hava a real mesh network), and the last one is a beacon (board C).
I want to collect C's data on board A, and then sending those data by sending a message to B. It must be done periodically.
I have a few questions.

1. Do I need to use a mesh model to send a message through the mesh ? If yes, how can I use it ? I'm asking this because I felt like I could do otherwise.

2. It looks like I could use hearbeat message to send this message, but I'm not sure if I to use it. Could I have some explanation on how the heartbeat works, and on where it publish ?

3. Is it possible for the beacon to be in BLE and not a part of the mesh network ? I mean that I don't know if I can use BLE and Mesh in one node (for A and B) in order to scan for beacons to collect data and then send a message with the data collected.

Thanks for your response.
Regards
Paul.


Re: Nordic nRF52832 - UART redefining the pins?

frv
 

Hi Carles,

Finally I got it up and running :).

So indeed changing the pinning in the overlay file did the trick, although I also had to redefine the cts/rts despite not using them as one of the values was used by my new RX pin value. 

Also I had to downgrade speed to 115200 instead of default 1000000.
I was a little bit surprised when baudrate/speed is set in the configuration it can no longer be adjusted in the btattach command.
E.g. If 1000000 is set in the overlay file it can not be set as btattach -B /dev/ttyUSB0 -S 115200 or at least it will not work.

Also I had to set explicit the -N to disable "flow control" when using the btattach command despite it was set in the nrf52.conf file.

So after a little bit of puzzling with parameters I got the result I wanted to have.

In our final design we will use the "hardware flow control" of course and use as baudrate 1M but in my setup the RS232/USB converter was limited to 115200.

Best regards,
Frank


Re: rtc api in zephyr

Chruściński, Krzysztof
 

Hi,

 

Yes, it is recommended to use counter API instead.

 

Regards,

Krzysztof

 

From: devel@... <devel@...> On Behalf Of Aaron Xu via Lists.Zephyrproject.Org
Sent: Tuesday, April 9, 2019 3:44 AM
To: zephyr-devel <zephyr-devel@...>
Cc: devel@...
Subject: [Zephyr-devel] rtc api in zephyr

 

Hi,

I just heard rtc api is deprecated, but I can not find any clue in the documentation or in this mail list. What's that mean?
Should we avoid to use rtc api in the future and change to counter api?

 

Thanks. Regards


rtc api in zephyr

Aaron Xu
 

Hi,

I just heard rtc api is deprecated, but I can not find any clue in the documentation or in this mail list. What's that mean?
Should we avoid to use rtc api in the future and change to counter api?

Thanks. Regards


Re: Nordic nRF52832 - UART redefining the pins?

Carles Cufi
 

Hi there,

 

The default PINs are configured in the board .dts file:

https://github.com/zephyrproject-rtos/zephyr/blob/master/boards/arm/nrf52_pca10040/nrf52_pca10040.dts#L95

 

You can indeed change them in you .overlay file.

 

Hardware flow-control is not required but highly recommended.

 

Regards,

 

Carles

 

From: devel@... <devel@...> On Behalf Of frv via Lists.Zephyrproject.Org
Sent: 08 April 2019 13:04
To: devel@...
Cc: devel@...
Subject: [Zephyr-devel] Nordic nRF52832 - UART redefining the pins?

 

Hi Zephyr community,

 

So far I couldn't see where the default UART rx/tx pin mapping (RX = 8 and TX = 6) is happening in the Zephyr code.

I want to run the hci_uart on the nRF52832 SoC to implement just the BLE connectivity.

 

I'm wondering can the default UART pinning of RX/TX/CTS/.. be re-programmed in the nrf52_pca10040.overlay file.

 

E.g something like this:

 

 

Probably HW flow control is "always" required for h4 communication?!

 

Thanks in advance,

 

Best regards,

Frank


Nordic nRF52832 - UART redefining the pins?

frv
 

Hi Zephyr community,

So far I couldn't see where the default UART rx/tx pin mapping (RX = 8 and TX = 6) is happening in the Zephyr code.
I want to run the hci_uart on the nRF52832 SoC to implement just the BLE connectivity.

I'm wondering can the default UART pinning of RX/TX/CTS/.. be re-programmed in the nrf52_pca10040.overlay file.

E.g something like this:



Probably HW flow control is "always" required for h4 communication?!

Thanks in advance,

Best regards,
Frank


Re: BLE throughput under load, QOS #ble #nrf52840

Luiz Augusto von Dentz
 

Hi Henry,

I wonder if this could be related to the lack of buffers on the host,
I assume you would use bt_gatt_notify with NULL conn which will take
care of notifying each connection but that may end up consuming all
the buffers blocking which could the unbalanced since the connection
that first appear on the list would probably never block.

You could perhaps try to increase the buffer pool with:

CONFIG_BT_L2CAP_TX_BUF_COUNT 5

If that solves it we may have to consider making the default the
number of connection + 1 so we can actually emit notifications to all
connection at once, though that doesn't guarantee there is always
going to be buffer available if there are more traffic going on.

On Tue, Apr 2, 2019 at 9:50 PM <henry.wagner@lairdtech.com> wrote:

After implementing a throughput test for BLE using Nordic nrf52840 hardware and Zephyr 1.14-rc1, notice some curious behavior in data we are collecting. The test is to evaluate maximum throughput in a 1 to many and many to 1 scenario. Testing seems to show that when sending data from the central (client) to peripheral (server), the throughput performance is relatively balanced per connection but one peripheral seems to get less data and one peripheral get more than the others. In data flow from the peripherals to the central, it is much more unbalanced with one or two peripherals having all the throughput and the others having none.

The central to peripheral is 1:N where the central is a single point source. The many peripherals to central is an N:1 with many sources. In my case N is 1 up to 5, but would like to be greater. The overall aggregate throughput is constant, just not evenly distributed among the BLE devices or comm directions. Using DLE and 2M PHY and data is transferred using bt_gatt_write_without_response on client and bt_gatt_notify and the server.

There doesn't seem to be any QOS but I would not have expected such unbalanced behavior. Any thoughts to why this is and how to diagnose/resolve to produce consistent and balanced throughput among the BLE devices? Do I have something misconfigured in my devices? Can share if that will help.
--
Luiz Augusto von Dentz


Re: [bt_le]Does Zephyr have APIs to get ConnInterval, DataLengthExtension and PHY?

Kai Ren
 

Hi Johan,
Thanks for the prompt reply, this is useful for me.
I think it's good idea to become a contributor of Zephyr project.


Regards,
Kai




On 2019/4/5, 11:09 PM, "Hedberg, Johan" <johan.hedberg@intel.com> wrote:

Hi Kai,

On 5 Apr 2019, at 17.01, Kai Ren <kren@bluetooth.com> wrote:
> I’m trying to find the APIs on Zephyr, https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.zephyrproject.org%2Flatest%2Freference%2Fbluetooth%2Findex.html&;data=02%7C01%7C%7C9bc06492be1f40b3938408d6b9d8a2a8%7Ce4e0fec5fc6c4dd6ae374bdb30e156b9%7C0%7C0%7C636900737429115435&amp;sdata=RZI2kony2KrDUqCSkdmaly4ePPUgMCa8c6ivMJ9Zc5k%3D&amp;reserved=0 , using these APIs can get
> • ConnInterval,
> • whether Data Length Extension is enable or not, and
> • which PHY is using, 1M uncoded, 2M uncoded or 1M coded?
> But I haven’t found them, so send this email for help.

The API to get information on a connection is bt_conn_get_info(). Out of the parameters you mentioned you can get at least get the interval, however DLE or PHY information is not currently exposed (contributions are welcome!).

Johan


Support for Open Supervised Device Protocol (OSDP) in Zephyr

Siddharth Chandrasekaran
 

Hello,

I'm working on an project that involves Open Supervised Device Protocol (OSDP) [1], an access control communication protocol used in the security industry. I'm working on this as an application at this point but I think this protocol may be useful for others too. So I'm looking at options for upstreaming it.

I would like to know if this is something that the upstream is interested at this point. If so, some pointers on where to add such protocol implementations and other references would be of help.

Thanks,
Sid.

[1]: https://www.securityindustry.org/industry-standards/open-supervised-device-protocol/


To bring back RPL to Zephyr project

Jian Zhang
 

Hi All,

I am kind of new to Zephyr dev community. Previously our team was using Zephyr without actively involved in kernel development.

Recently we just noticed that RPL module will be removed in the coming release. Because we are using Zephyr and RPL in the current project and probably will keep using it. I am thinking of bringing it back and take the responsibility to maintain it.

Just want to check if the RPL module with Zephyr is used anywhere? In case it's not required by anyone else, it probably would be easier for us to maintain our own branch.

Please let me know if you guys have any thoughts.

Thanks and Best Regards,
Jian


Re: [bt_le]Does Zephyr have APIs to get ConnInterval, DataLengthExtension and PHY?

Johan Hedberg
 

Hi Kai,

On 5 Apr 2019, at 17.01, Kai Ren <kren@bluetooth.com> wrote:
I’m trying to find the APIs on Zephyr, https://docs.zephyrproject.org/latest/reference/bluetooth/index.html , using these APIs can get
• ConnInterval,
• whether Data Length Extension is enable or not, and
• which PHY is using, 1M uncoded, 2M uncoded or 1M coded?
But I haven’t found them, so send this email for help.
The API to get information on a connection is bt_conn_get_info(). Out of the parameters you mentioned you can get at least get the interval, however DLE or PHY information is not currently exposed (contributions are welcome!).

Johan


[bt_le]Does Zephyr have APIs to get ConnInterval, DataLengthExtension and PHY?

Kai Ren
 

Hello,

I’m trying to find the APIs on Zephyr, https://docs.zephyrproject.org/latest/reference/bluetooth/index.html , using these APIs can get

  • ConnInterval,
  • whether Data Length Extension is enable or not, and
  • which PHY is using, 1M uncoded, 2M uncoded or 1M coded?

But I haven’t found them, so send this email for help.

Thanks!

 

Regards,

Kai

 

 

 


Re: Removing padding from generated hex files

Sebastian Boe
 

"Does the ". = 0x1000;" indicate the padding?"


Yes, you would want to compare it to the source to see what it's trying to do, and possibly
how to make it stop.

________________________________________
From: Jamie Mccrae <Jamie.Mccrae@lairdconnect.com>
Sent: Thursday, April 4, 2019 3:13 PM
To: Bøe, Sebastian; devel@lists.zephyrproject.org
Subject: RE: Removing padding from generated hex files

Hi,
That's where I'm not sure on, I see the fill section but can't work out where it's coming from:
Memory Configuration

Name Origin Length Attributes
FLASH 0x00000000 0x00100000 xr
SRAM 0x20000000 0x00040000 xw
IDT_LIST 0x20040000 0x00000800 xw
*default* 0x00000000 0xffffffff

Linker script and memory map

LOAD zephyr/CMakeFiles/kernel_elf.dir/misc/empty_file.c.obj
LOAD zephyr/CMakeFiles/kernel_elf.dir/isr_tables.c.obj
LOAD app/libapp.a
LOAD zephyr/libzephyr.a
LOAD zephyr/arch/arch/arm/core/libarch__arm__core.a
LOAD zephyr/arch/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a
LOAD zephyr/arch/arch/arm/core/cortex_m/mpu/libarch__arm__core__cortex_m__mpu.a
LOAD zephyr/lib/libc/minimal/liblib__libc__minimal.a
LOAD zephyr/boards/arm/nrf52840_pca10059/libboards__arm__nrf52840_pca10059.a
LOAD zephyr/drivers/serial/libdrivers__serial.a
LOAD zephyr/kernel/libkernel.a
LOAD zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
LOAD c:/gcc-arm/bin/../lib/gcc/arm-none-eabi/8.2.1/thumb/v7e-m/nofp\libgcc.a
0x00000020 _region_min_align = 0x20

.rel.plt 0x00000000 0x0
*(SORT_BY_ALIGNMENT(.rel.plt))
[!provide] PROVIDE (__rel_iplt_start = .)
*(SORT_BY_ALIGNMENT(.rel.iplt))
.rel.iplt 0x00000000 0x0 zephyr/CMakeFiles/kernel_elf.dir/isr_tables.c.obj
[!provide] PROVIDE (__rel_iplt_end = .)

.rela.plt 0x00000000 0x0
*(SORT_BY_ALIGNMENT(.rela.plt))
[!provide] PROVIDE (__rela_iplt_start = .)
*(SORT_BY_ALIGNMENT(.rela.iplt))
[!provide] PROVIDE (__rela_iplt_end = .)

.rel.dyn
*(SORT_BY_ALIGNMENT(.rel.*))

.rela.dyn
*(SORT_BY_ALIGNMENT(.rela.*))

/DISCARD/
*(SORT_BY_ALIGNMENT(.plt))
*(SORT_BY_ALIGNMENT(.iplt))
*(SORT_BY_ALIGNMENT(.got.plt))
*(SORT_BY_ALIGNMENT(.igot.plt))
*(SORT_BY_ALIGNMENT(.got))
*(SORT_BY_ALIGNMENT(.igot))
*(SORT_BY_ALIGNMENT(.irq_info))
*(SORT_BY_ALIGNMENT(.intList))
0x00000000 _image_rom_start = 0x0

text 0x00000000 0x1100
0x00001000 . = 0x1000
*fill* 0x00000000 0x1000
0x00001000 _vector_start = .
*(SORT_BY_ALIGNMENT(.exc_vector_table))
*(SORT_BY_ALIGNMENT(.exc_vector_table.*))

The linker.cmd file has this:
_image_rom_start = (0x0 + 0x0);
text :
{
. = 0x1000;
_vector_start = .;
KEEP(*(.exc_vector_table))
KEEP(*(".exc_vector_table.*"))
KEEP(*(.gnu.linkonce.irq_vector_table))
KEEP(*(.vectors))
KEEP(*(.openocd_dbg))
KEEP(*(".openocd_dbg.*"))

KEEP(*(.kinetis_flash_config))
KEEP(*(".kinetis_flash_config.*"))
_vector_end = .;
} > FLASH
Does the ". = 0x1000;" indicate the padding?
Thanks,
Jamie

-----Original Message-----

Okay, if I was you I would have a look at the map file and try to figure out what it's putting there and why.


Re: Removing padding from generated hex files

lairdjm
 

Hi,
That's where I'm not sure on, I see the fill section but can't work out where it's coming from:
Memory Configuration

Name Origin Length Attributes
FLASH 0x00000000 0x00100000 xr
SRAM 0x20000000 0x00040000 xw
IDT_LIST 0x20040000 0x00000800 xw
*default* 0x00000000 0xffffffff

Linker script and memory map

LOAD zephyr/CMakeFiles/kernel_elf.dir/misc/empty_file.c.obj
LOAD zephyr/CMakeFiles/kernel_elf.dir/isr_tables.c.obj
LOAD app/libapp.a
LOAD zephyr/libzephyr.a
LOAD zephyr/arch/arch/arm/core/libarch__arm__core.a
LOAD zephyr/arch/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a
LOAD zephyr/arch/arch/arm/core/cortex_m/mpu/libarch__arm__core__cortex_m__mpu.a
LOAD zephyr/lib/libc/minimal/liblib__libc__minimal.a
LOAD zephyr/boards/arm/nrf52840_pca10059/libboards__arm__nrf52840_pca10059.a
LOAD zephyr/drivers/serial/libdrivers__serial.a
LOAD zephyr/kernel/libkernel.a
LOAD zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
LOAD c:/gcc-arm/bin/../lib/gcc/arm-none-eabi/8.2.1/thumb/v7e-m/nofp\libgcc.a
0x00000020 _region_min_align = 0x20

.rel.plt 0x00000000 0x0
*(SORT_BY_ALIGNMENT(.rel.plt))
[!provide] PROVIDE (__rel_iplt_start = .)
*(SORT_BY_ALIGNMENT(.rel.iplt))
.rel.iplt 0x00000000 0x0 zephyr/CMakeFiles/kernel_elf.dir/isr_tables.c.obj
[!provide] PROVIDE (__rel_iplt_end = .)

.rela.plt 0x00000000 0x0
*(SORT_BY_ALIGNMENT(.rela.plt))
[!provide] PROVIDE (__rela_iplt_start = .)
*(SORT_BY_ALIGNMENT(.rela.iplt))
[!provide] PROVIDE (__rela_iplt_end = .)

.rel.dyn
*(SORT_BY_ALIGNMENT(.rel.*))

.rela.dyn
*(SORT_BY_ALIGNMENT(.rela.*))

/DISCARD/
*(SORT_BY_ALIGNMENT(.plt))
*(SORT_BY_ALIGNMENT(.iplt))
*(SORT_BY_ALIGNMENT(.got.plt))
*(SORT_BY_ALIGNMENT(.igot.plt))
*(SORT_BY_ALIGNMENT(.got))
*(SORT_BY_ALIGNMENT(.igot))
*(SORT_BY_ALIGNMENT(.irq_info))
*(SORT_BY_ALIGNMENT(.intList))
0x00000000 _image_rom_start = 0x0

text 0x00000000 0x1100
0x00001000 . = 0x1000
*fill* 0x00000000 0x1000
0x00001000 _vector_start = .
*(SORT_BY_ALIGNMENT(.exc_vector_table))
*(SORT_BY_ALIGNMENT(.exc_vector_table.*))

The linker.cmd file has this:
_image_rom_start = (0x0 + 0x0);
text :
{
. = 0x1000;
_vector_start = .;
KEEP(*(.exc_vector_table))
KEEP(*(".exc_vector_table.*"))
KEEP(*(.gnu.linkonce.irq_vector_table))
KEEP(*(.vectors))
KEEP(*(.openocd_dbg))
KEEP(*(".openocd_dbg.*"))

KEEP(*(.kinetis_flash_config))
KEEP(*(".kinetis_flash_config.*"))
_vector_end = .;
} > FLASH
Does the ". = 0x1000;" indicate the padding?
Thanks,
Jamie

-----Original Message-----

Okay, if I was you I would have a look at the map file and try to figure out what it's putting there and why.


Re: Removing padding from generated hex files

Sebastian Boe
 

Okay, if I was you I would have a look at the map file and try to figure out what it's putting there and why.

________________________________________
From: Jamie Mccrae <Jamie.Mccrae@lairdconnect.com>
Sent: Thursday, April 4, 2019 2:34 PM
To: Bøe, Sebastian; devel@lists.zephyrproject.org
Subject: RE: Removing padding from generated hex files

Hi,
I have tried that but it still pads the first section with 0x00 bytes. I'm using a custom board file and project so tried switched to trying it with the hello world sample using the nrf52840_pca10059 board file and enabled the option there, the area where the MBR is, is filled with 0x00 inside the hex file.
Thanks,
Jamie

-----Original Message-----

Hi,

try enabling

CONFIG_BUILD_NO_GAP_FILL

IMHO this should be the default. Needing to fill the gaps is indicative of a problem
elsewhere, e.g. in the linker scripts.


Re: Removing padding from generated hex files

lairdjm
 

Hi,
I have tried that but it still pads the first section with 0x00 bytes. I'm using a custom board file and project so tried switched to trying it with the hello world sample using the nrf52840_pca10059 board file and enabled the option there, the area where the MBR is, is filled with 0x00 inside the hex file.
Thanks,
Jamie

-----Original Message-----

Hi,

try enabling

CONFIG_BUILD_NO_GAP_FILL

IMHO this should be the default. Needing to fill the gaps is indicative of a problem
elsewhere, e.g. in the linker scripts.

2021 - 2040 of 7923