Date   

API meeting: agenda

Carles Cufi
 

Hi all,

The topics for today:

- New API: DAC
- https://github.com/zephyrproject-rtos/zephyr/pull/21805

- Overall post-GPIO triage and decision on what to tackle next

Additional items in the "Triage" column in the GitHub project may be discussed if time permits.
If you want an item included in the meeting, please add it to the GitHub project.

https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-discussion
https://github.com/zephyrproject-rtos/zephyr/projects/18
https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit

Regards,

Carles


BBC-Microbit BLE MESH sending data #ble #bluetoothmesh #gpio #bluetooth #nrf51822

Daniel Fox <danny.fox97@...>
 

Hi,
I am currently doing an engineering project for my final year, I have been using the bluetooth mesh demo on the zephyr project using the bbc microbits, I have set up a pir sensor up to produce a simple print statement("warning motion detected") to a serial communication terminal (Putty).
Set up as follows:
- BBC microbit hooked up to motion sensor
-BBC microbits acting as beacons to send data to final device 
-Final bbc microbit connected to computer with putty running

I want to send temperature readings to display onto a serial communication terminal. I am not sure how to send the readings over the mesh network as all i have really done is placed a print statement in the code. I'm wondering how do I send sensor readings over the ble mesh network using bbc microbits?(from my understanding I may need to send data packets but I'm unsure on how I would begin to code this). 
Any help would be appreciated, thanks for your time!
Regards,
Danny


Re: Private: Re: [Zephyr-users] bt_set_name() and setting local name #ble #bt #bluetooth #api

Carles Cufi
 

Hi there,

 

The name is placed in the advertising data automatically when you call bt_le_adv_start(BT_LE_ADV_CONN_NAME).  When you call bt_set_name(), that is updated as well:

https://github.com/zephyrproject-rtos/zephyr/blob/master/subsys/bluetooth/host/hci_core.c#L5444

 

That said, the name is placed in the scan response, so you need to make sure the scanner is performing active scanning.

 

Regards,

 

Carles

 

From: j.cheng via Lists.Zephyrproject.Org <j.cheng=de-haardt.com@...>
Sent: 10 February 2020 10:56
To: Cufi; Cufi, Carles <Carles.Cufi@...>
Subject: Private: Re: [Zephyr-users] bt_set_name() and setting local name #ble #bt #bluetooth #api

 

Hi,

Thanks for the quick reply.

I tried connecting and disconnecting several times. Also tried reinstalling the app. After waiting for some minutes, it still displays Zephyr. Is it possible that the local name differs from the advertising name?

Regards,

Jamie


Re: bt_set_name() and setting local name #bt #bluetooth #api #ble

Carles Cufi
 

Hi there,

 

Most smartphones implement some sort of advertising data caching. Try stopping and starting scanning from the phone a couple of times to see if the name is updated without the need to connect.

 

Regards,

 

Carles

 

From: users@... <users@...> On Behalf Of j.cheng via Lists.Zephyrproject.Org
Sent: 10 February 2020 10:06
To: users@...
Cc: users@...
Subject: [Zephyr-users] bt_set_name() and setting local name #ble #bt #bluetooth #api

 

Hello,

I want to change the ble device name during runtime. I've enabled BT_DEVICE_NAME_DYNAMIC and BT_SETTINGS.

To change the device name during runtime i'm using bt_set_name(). However, when scanning for the device using the nrf connect toolbox app on my android device, i still see ''Zephyr'' as the device name. Only after connecting with the device, i see the correct new device name that was set by bt_set_name().

The bt_set_name() works, but not the way i would like to. Is there a way to show the changed device name before connecting with the device?

Kind regards,

Jamie


bt_set_name() and setting local name #bt #bluetooth #api #ble

j.cheng@...
 

Hello,

I want to change the ble device name during runtime. I've enabled BT_DEVICE_NAME_DYNAMIC and BT_SETTINGS.

To change the device name during runtime i'm using bt_set_name(). However, when scanning for the device using the nrf connect toolbox app on my android device, i still see ''Zephyr'' as the device name. Only after connecting with the device, i see the correct new device name that was set by bt_set_name().

The bt_set_name() works, but not the way i would like to. Is there a way to show the changed device name before connecting with the device?

Kind regards,

Jamie


Re: Devicetree config generation

Carles Cufi
 

Hi Petr,

 

Yes, this has been talked about repeatedly over the last couple of years.

You can find most of the issues and PRs related to the work that has been done so far in this umbrella issue:

https://github.com/zephyrproject-rtos/zephyr/issues/8499

 

In the dev-review meeting on Thursdays we are currently discussing DeviceTree-related topics, and code generation, and in particular to solve the pinctrl/pinmux problem but also for instancing, is one of those topics.

Kumar Gala (on copy) drives the overall DT efforts within Zephyr. Feel free to join the meeting or comment on the multiple issues or Pull Requests on GitHub to drive the feature forward.

 

Regards,

 

Carles

 

From: <users@...> on behalf of "Petr Buchta via Lists.Zephyrproject.Org" <cz7asm=googlemail.com@...>
Reply-To: "cz7asm@..." <cz7asm@...>
Date: Sunday, 9 February 2020 at 16:48
To: "users@..." <users@...>
Cc: "users@..." <users@...>
Subject: [Zephyr-users] Devicetree config generation

 

Hi, I just started looking around Zephyr and coming from Linux world I really like the idea of using Devicetree for driver configuration.

 

I noticed, however, that config generation that enables particular low level driver must be dobe manualy using Kconfig. I know that this is the same in Linux but given the way Zephyr leverages DT I would think that, in this case, config generation based on DT could simplify things.

 

For example looking at led_strip driver code samples, there are projects that duplicate almost all code only to bind to a different low level driver, like samples/drivers/apa102 and samples/drivers/ws2812. They even have the same prj.conf. 

If the DT processing could provide things like mapping "enabled device compatible string" -> "LL driver CONFIG_xx parameter", then there would be no need for code duplication and all the samples utilizing same driver api could share same project.

 

Is this something that's been considered but abandoned for a reason?

 

Thanks,

Petr


Devicetree config generation

Petr Buchta <cz7asm@...>
 

Hi, I just started looking around Zephyr and coming from Linux world I really like the idea of using Devicetree for driver configuration.

I noticed, however, that config generation that enables particular low level driver must be dobe manualy using Kconfig. I know that this is the same in Linux but given the way Zephyr leverages DT I would think that, in this case, config generation based on DT could simplify things.

For example looking at led_strip driver code samples, there are projects that duplicate almost all code only to bind to a different low level driver, like samples/drivers/apa102 and samples/drivers/ws2812. They even have the same prj.conf. 
If the DT processing could provide things like mapping "enabled device compatible string" -> "LL driver CONFIG_xx parameter", then there would be no need for code duplication and all the samples utilizing same driver api could share same project.

Is this something that's been considered but abandoned for a reason?

Thanks,
Petr


West 0.7.0 released, requires manual intervention on Ubuntu

Bolivar, Marti
 

Hello,

West 0.7.0 has been released. The main new feature since 0.6.x is the
addition of "manifest imports", which let you pull in west.yml files
from elsewhere into your own manifest file.

You can upgrade in the usual ways:

pip3 install west==0.7.0 # Windows and macOS
pip3 install --user west==0.7.0 # Linux

Please note that there is a problem with the upgrade on the version of
pip3 which ships with Ubuntu 18.04. Other Linux distributions, macOS,
and Windows are all upgrading successfully.

On Ubuntu only, you will need to choose from one of the following
workarounds to upgrade west:

1. Remove the old west before upgrading, like this:

$ pip3 show west | grep Location: | cut -f 2 -d ' '
/home/foo/.local/lib/python3.6/site-packages
$ rm -r /home/foo/.local/lib/python3.6/site-packages/west
$ pip3 install --user west==0.7.0

2. Install west in a virtual environment using a more recent
version of pip3, e.g. using the venv module:

https://docs.python.org/3/library/venv.html

Further details in this issue:

https://github.com/zephyrproject-rtos/west/issues/373

And in particular, this comment:

https://github.com/zephyrproject-rtos/west/issues/373#issuecomment-583489272

Thanks,
Marti


The topic-gpio branch has been merged to master

Carles Cufi
 

Hi all,

As of this morning the 313 commits in the topic-gpio branch have been merged into Zephyr's master branch.

What this means for you if:

a) You are a GPIO API user:

- Big chunks of the existing API have been deprecated, leading to deprecation build warnings. You should port your application to the new GPIO API as soon as possible, although you have 2 full Zephyr releases until the deprecated API is finally removed. Please refer to Peter Bigot's "porting guide" in this GitHub comment for additional information:
https://github.com/zephyrproject-rtos/zephyr/issues/20017#issuecomment-549315497

b) You have outstanding, unmerged Pull Requests:

- The Pull Requests may show green CI, but that is misleading. We encourage you to rebase your Pull Request as soon as possible against the current master and push.

- If your Pull Request makes use of the GPIO API, it will not pass CI due to deprecation warnings. There is no solution but to port your code to the new GPIO API. If you are on a deadline for 2.2 feature freeze ping us on the #gpio channel on Slack to see if we can help.

c) You are a maintainer with merge rights:

- You need to make sure that CI has been rerun after the topic-gpio merge happened and *before* you merge any Pull Request to master

Additional information about the merge process can be found here:

https://github.com/zephyrproject-rtos/zephyr/issues/21789

Finally I want to thank everybody who contributed to this effort, which has spanned many months and several hundred commits.
Special mention to Piotr Mienkowski and Peter Bigot, whose dedication to getting this done has made it possible to merge this branch in time for the 2.2 release.

Regards,

Carles


API meeting: Agenda

Carles Cufi
 

Hi all,

Today we will talk first about GPIO and the merge of the topic-gpio branch to master:

- Cleanup the public and private API with typedefs
- Testing status
- Issues with master CI that might prevent the merge to master
- https://github.com/zephyrproject-rtos/zephyr/issues/21789

Additionally I'd like to discuss:

- RFC: API Change: clock_control
- https://github.com/zephyrproject-rtos/zephyr/issues/22424

- Ability to use an API with device without extending its own API
- https://github.com/zephyrproject-rtos/zephyr/issues/22415

Additional items in the "Triage" column in the GitHub project may be discussed if time permits.
If you want an item included in the meeting, please add it to the GitHub project.

https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-discussion
https://github.com/zephyrproject-rtos/zephyr/projects/18
https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit

Regards,

Carles


Re: SDK 0.11.1 Release

Nashif, Anas
 

Hi,
Thanks Kumar.

Please note that this version of the SDK is now required for development on master and is enabled in CI.


Anas

On 03/02/2020, 05:56, "users@... on behalf of Kumar Gala" <users@... on behalf of kumar.gala@...> wrote:

Hi,

Some minor fixes that got missed for the v0.11.0 release. Mostly impacts OpenOCD and newlib usage.

The SDK can be found here:

https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.11.1

Please download and try things out and report any issues.

OpenOCD:

• Fixed missing commits from rebase - related to ARC and Zephyr RTOS awareness

Newlib:

• Removed setting -DMISSING_SYSCALL_NAMES on builds. Make syscall function names consistent and naming compatible with 3rd party GNU toolchains.

Thanks to all that contributed fixes and enhancements to this version of the SDK.

- k


SDK 0.11.1 Release

Kumar Gala
 

Hi,

Some minor fixes that got missed for the v0.11.0 release. Mostly impacts OpenOCD and newlib usage.

The SDK can be found here:

https://github.com/zephyrproject-rtos/sdk-ng/releases/tag/v0.11.1

Please download and try things out and report any issues.

OpenOCD:

• Fixed missing commits from rebase - related to ARC and Zephyr RTOS awareness

Newlib:

• Removed setting -DMISSING_SYSCALL_NAMES on builds. Make syscall function names consistent and naming compatible with 3rd party GNU toolchains.

Thanks to all that contributed fixes and enhancements to this version of the SDK.

- k


Re: Setting #uart parity to 'even' with #stm32 using device tree #uart #stm32

Pauli
 

Dear all,

if somebody tumbles here with google about the parity, i found no way to do it from device tree, but 8-databits, even parity, 1 stopbit seems to work in my case with patch pasted below. There are devicetree bindings on the same file, but nothing regarding the parity (i could make pull for this single case, but i guess the modifications should go to serial-device tree bindings, and that sounds like larger pull that i am afraid i do not have time).

Also, ror the record: with this setup one can use HC-05 with stm32_min_dev board, and with burned in st-system bootloader one can achive "update over bluetooth" using stm32loader.py: shell command to enter bootloader (writes to backup registers that next reset jump to bootloader, followed by system reset) -- and then closes command terminal and runs stm32loader.py over bluetooth.

Br,
Pauli


diff --git a/drivers/serial/uart_stm32.c b/drivers/serial/uart_stm32.c
index 3d0dd1ca84..03948225a0 100644
--- a/drivers/serial/uart_stm32.c
+++ b/drivers/serial/uart_stm32.c
@@ -671,8 +671,8 @@ static int uart_stm32_init(struct device *dev)
 
        /* 8 data bit, 1 start bit, 1 stop bit, no parity */
        LL_USART_ConfigCharacter(UartInstance,
-                                LL_USART_DATAWIDTH_8B,
-                                LL_USART_PARITY_NONE,
+                                LL_USART_DATAWIDTH_9B,
+                                LL_USART_PARITY_EVEN,
                                 LL_USART_STOPBITS_1);
 
        if (config->hw_flow_control) {


Re: Adding a costume module to my project #west

Bolivar, Marti
 

Hi,

Please check your build directory's zephyr_modules.txt file to make sure
it is being included in the list. If it's not, please check where you
are setting ZEPHYR_EXTRA_MODULES again.

If it is present in zephyr_modules.txt but you're not seeing it get
compiled, please try debugging with this PR:

https://github.com/zephyrproject-rtos/zephyr/pull/22321

If that patch doesn't generate any errors, I suspect your module's
CMakeLists.txt is not building the source code.

HTH,
Marti

"Stefan Hristozov via Lists.Zephyrproject.Org"
<stefan.hristozov=aisec.fraunhofer.de@...> writes:

Hi,

I moved

set ( $ENV{ZEPHYR_EXTRA_MODULES} pbs_path/module1)

before

include ( $ENV{ZEPHYR_BASE} /cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project (NONE)


Unfortunately I am still getting the same linker error.

Best regards
Stefan


Am 01/29/2020 um 02:10 AM schrieb Bolivar, Marti:
"stefan.hristozov via Lists.Zephyrproject.Org"
<stefan.hristozov=aisec.fraunhofer.de@...> writes:

Hi,

I want to add a module to my project. My folder structure looks like this:

<top dir>
|---modules
| |---module1
| | |---CMakeLists.txt
| | |---inc
| | |---src
| | |---zephyr
| | |---module.yml
| |---module2
|---app
|---app1

*Where modules/module1/CMakeLists.txt:*

zephyr_interface_library_named(test)
target_include_directories(test INTERFACE inc)
zephyr_library()
zephyr_library_sources(
src/test.c
)
zephyr_library_link_libraries(test)
target_link_libraries(test INTERFACE zephyr_interface)

*modules/module1/zephyr/module.yml:*

build:
cmake: .

*app/app1/CMakeLists.txt:*
cmake_minimum_required (VERSION 3.13.1)
include ( $ENV{ZEPHYR_BASE} /cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project (NONE)

set ( $ENV{ZEPHYR_EXTRA_MODULES} pbs_path/module1)
Looking at this quickly, ZEPHYR_EXTRA_MODULES needs to be set before
including the boilerplate file, not before. You can also set it as an
ordinary CMake variable; you don't need to set it in the environment.


FILE (GLOB app_sources src/*.c)
target_sources (app PRIVATE ${app_sources} )
target_include_directories (app PRIVATE $ENV{ZEPHYR_BASE} /subsys/net/ip)

target_link_libraries (app PRIVATE test)

Unfortunately, with this set up module1 doesn't get compiled and I get a linker error when I try to use functions from that module. I assume that something goes wrong with ZEPHYR_EXTRA_MODULES but I don't know what.
HTH,
Marti

Best regards
Stefan

--
Stefan Hristozov
Department Hardware Security
Fraunhofer Institute for Applied and Integrated Security AISEC
Lichtenbergstraße 11, 85748 Garching near Munich, Germany
Tel. +49 89 32299 86 157
stefan.hristozov@...
http://www.aisec.fraunhofer.de
http://twitter.com/FraunhoferAISEC



Re: Adding a costume module to my project #west

Stefan Hristozov
 

Hi,

I moved

set ( $ENV{ZEPHYR_EXTRA_MODULES} pbs_path/module1)

before

include ( $ENV{ZEPHYR_BASE} /cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project (NONE)


Unfortunately I am still getting the same linker error.

Best regards
Stefan


Am 01/29/2020 um 02:10 AM schrieb Bolivar, Marti:

"stefan.hristozov via Lists.Zephyrproject.Org"
<stefan.hristozov=aisec.fraunhofer.de@...> writes:

Hi,

I want to add a module to my project. My folder structure looks like this:

<top dir>
|---modules
| |---module1
| | |---CMakeLists.txt
| | |---inc
| | |---src
| | |---zephyr
| | |---module.yml
| |---module2
|---app
|---app1

*Where modules/module1/CMakeLists.txt:*

zephyr_interface_library_named(test)
target_include_directories(test INTERFACE inc)
zephyr_library()
zephyr_library_sources(
src/test.c
)
zephyr_library_link_libraries(test)
target_link_libraries(test INTERFACE zephyr_interface)

*modules/module1/zephyr/module.yml:*

build:
cmake: .

*app/app1/CMakeLists.txt:*
cmake_minimum_required (VERSION 3.13.1)
include ( $ENV{ZEPHYR_BASE} /cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project (NONE)

set ( $ENV{ZEPHYR_EXTRA_MODULES} pbs_path/module1)
Looking at this quickly, ZEPHYR_EXTRA_MODULES needs to be set before
including the boilerplate file, not before. You can also set it as an
ordinary CMake variable; you don't need to set it in the environment.


FILE (GLOB app_sources src/*.c)
target_sources (app PRIVATE ${app_sources} )
target_include_directories (app PRIVATE $ENV{ZEPHYR_BASE} /subsys/net/ip)

target_link_libraries (app PRIVATE test)

Unfortunately, with this set up module1 doesn't get compiled and I get a linker error when I try to use functions from that module. I assume that something goes wrong with ZEPHYR_EXTRA_MODULES but I don't know what.
HTH,
Marti

Best regards
Stefan

--
Stefan Hristozov
Department Hardware Security
Fraunhofer Institute for Applied and Integrated Security AISEC
Lichtenbergstraße 11, 85748 Garching near Munich, Germany
Tel. +49 89 32299 86 157
stefan.hristozov@...
http://www.aisec.fraunhofer.de
http://twitter.com/FraunhoferAISEC


Re: Adding a costume module to my project #west

Bolivar, Marti
 

"stefan.hristozov via Lists.Zephyrproject.Org"
<stefan.hristozov=aisec.fraunhofer.de@...> writes:

Hi,

I want to add a module to my project. My folder structure looks like this:

<top dir>
|---modules
|      |---module1
|      |      |---CMakeLists.txt
|      |      |---inc
|      |      |---src
|      |      |---zephyr
|      |            |---module.yml
|      |---module2
|---app
|---app1

*Where modules/module1/CMakeLists.txt:*

zephyr_interface_library_named(test)
target_include_directories(test INTERFACE inc)
zephyr_library()
zephyr_library_sources(
src/test.c
)
zephyr_library_link_libraries(test)
target_link_libraries(test INTERFACE zephyr_interface)

*modules/module1/zephyr/module.yml:*

build:
cmake: .

*app/app1/CMakeLists.txt:*
cmake_minimum_required (VERSION 3.13.1)
include ( $ENV{ZEPHYR_BASE} /cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project (NONE)

set ( $ENV{ZEPHYR_EXTRA_MODULES} pbs_path/module1)
Looking at this quickly, ZEPHYR_EXTRA_MODULES needs to be set before
including the boilerplate file, not before. You can also set it as an
ordinary CMake variable; you don't need to set it in the environment.



FILE (GLOB app_sources src/*.c)
target_sources (app PRIVATE ${app_sources} )
target_include_directories (app PRIVATE $ENV{ZEPHYR_BASE} /subsys/net/ip)

target_link_libraries (app PRIVATE test)

Unfortunately,  with this set up module1 doesn't get compiled and I get a linker error when I try to use functions from that module. I assume that something goes wrong with ZEPHYR_EXTRA_MODULES but I don't know what.
HTH,
Marti

Best regards
Stefan


Adding a costume module to my project #west

Stefan Hristozov
 

Hi,

I want to add a module to my project. My folder structure looks like this:

<top dir>
    |---modules
    |      |---module1
    |      |      |---CMakeLists.txt
    |      |      |---inc
    |      |      |---src
    |      |      |---zephyr
    |      |            |---module.yml
    |      |---module2
    |---app
           |---app1

Where modules/module1/CMakeLists.txt:

zephyr_interface_library_named(test)
target_include_directories(test INTERFACE inc)
zephyr_library()
zephyr_library_sources(
    src/test.c
)
zephyr_library_link_libraries(test)
target_link_libraries(test INTERFACE zephyr_interface)

modules/module1/zephyr/module.yml:

build:
  cmake: .

app/app1/CMakeLists.txt:
cmake_minimum_required(VERSION 3.13.1)
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
project(NONE)

set($ENV{ZEPHYR_EXTRA_MODULES} pbs_path/module1)


FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})
target_include_directories(app PRIVATE $ENV{ZEPHYR_BASE}/subsys/net/ip)

target_link_libraries(app PRIVATE test)

Unfortunately,  with this set up module1 doesn't get compiled and I get a linker error when I try to use functions from that module. I assume that something goes wrong with ZEPHYR_EXTRA_MODULES but I don't know what.

Best regards
Stefan


Setting #uart parity to 'even' with #stm32 using device tree #uart #stm32

Pauli
 

Hello all,

I have been doing development with stm32f103 (blue-pill) board - and it has the system bootloader burned in. The bootloader uses settings 115200, 1 stop, even parity [1]. I would like to change my "normal" uart settings accordingly. I tried googling for device tree bindings, but it seems like there is no bindings for parity at device-tree level?

If device tree has no support for parity - i guess it is OK to re-initialize the uart with proper settings in early "application" main() ?

Long story:

I have successfully flashed the device with UART_1 using stm32loader.py over wire and wireless. Now final aim is to do firmware upgrade with the system bootloader over bluetooth by connecting HC-05 to the serial port and enter the bootloader programatically (by writing certain value to backup-registers, and checking that value on early boot). It shall require (for simplicity) that "normal mode" and "bootloader mode" shall use same uart settings. I tested that flashing over bluetooth seems to work ( but is painfully slow ).

[1] St / AN3155

Br,
Pauli


API meeting: Agenda

Carles Cufi
 

Hi all,

I cannot attend today so Peter Bigot will kindly chair the meeting instead.

The discussion will be centered exclusively around the completion of the GPIO transition into its new API.

- Driver conversion check:
- https://github.com/zephyrproject-rtos/zephyr/issues/18530

- Users conversion check:
- https://github.com/zephyrproject-rtos/zephyr/issues/20017

- Walk-through of the proposed merge procedure by the topic-gpio branch active manager, Peter Bigot:
- https://github.com/zephyrproject-rtos/zephyr/issues/21789#issuecomment-578810880
- Establish a timeline for completion of the full process

Additional items in the "Triage" column in the GitHub project may be discussed if time permits.
If you want an item included in the meeting, please add it to the GitHub project.

https://github.com/zephyrproject-rtos/zephyr/wiki/Zephyr-Committee-and-Working-Group-Meetings#zephyr-api-discussion
https://github.com/zephyrproject-rtos/zephyr/projects/18
https://docs.google.com/document/d/1lv-8B5QE2m4FjBcvfqAXFIgQfW5oz6306zJ7GIZIWCk/edit

Regards,

Carles


Re: Sample app hello_world fails with z_arm_usage_fault in arm_core_mpu_enable when linked in RAM

robmcgurrin@...
 

Hi Maureen,
Thank you for your reply. I will give it a try.  Just to follow up, what if I want to run my code out of SDRAM?
Thanks
Rob


On Mon, Jan 27, 2020 at 4:04 PM Maureen Helm (OSS) <maureen.helm@...> wrote:

Hi Rob,

You can set the following Kconfigs in your prj.conf:

 

CONFIG_CODE_ITCM=y

CONFIG_DATA_DTCM=y

 

See soc/arm/nxp_imx/rt/Kconfig.soc for more details.

 

Maureen

 

From: users@... <users@...> On Behalf Of robmcgurrin via Lists.Zephyrproject.Org
Sent: Friday, January 24, 2020 12:22 PM
To: users@...
Cc: users@...
Subject: [Zephyr-users] Sample app hello_world fails with z_arm_usage_fault in arm_core_mpu_enable when linked in RAM

 

Hi,
I am running on a nxp i.mx RT1064 eval, board mimxrt1064_evk.
I created a custom linker file to link the app to SRAM.  Here are the mods I made to the default linker file include/arch/arm/aarch32/cortex_m/scripts/linker.ld to force everything into SRAM:

#ifdef CONFIG_XIP

  #define ROMABLE_REGION SRAM

  #define RAMABLE_REGION SRAM

#else

  #define ROMABLE_REGION SRAM

  #define RAMABLE_REGION SRAM

#endif

And then I added this to prj.conf

CONFIG_HAVE_CUSTOM_LINKER_SCRIPT=y

CONFIG_CUSTOM_LINKER_SCRIPT="foo_linker.ld"

When I run the app I get this fault:
z_arm_usage_fault () at arch/arm/core/aarch32/fault_s.S:92      

Any suggestions?
Is there a better way to link my app to RAM?

Thanks in advance,
Rob