Re: flag for board type issue


Carles Cufi
 

If you switch to using west to build instead of invoking cmake and ninja directly, then you can add:

 

[build]

pristine = auto

 

in your ~/.westconfig and then west will clean the build folder for you whenever you switch apps or boards.

 

More info here: https://docs.zephyrproject.org/latest/guides/west/build-flash-debug.html#building-west-build

 

Carles

 

From: users@... <users@...> On Behalf Of Marc Herbert via Lists.Zephyrproject.Org
Sent: 09 July 2019 17:10
To: KAY LI NG <kayli0109@...>; users@...
Cc: users@...
Subject: Re: [Zephyr-users] flag for board type issue

 

I'm afraid that's the way CMake's cache works:

 

https://stackoverflow.com/questions/26145865/confused-about-cmakes-cached-variable-setting-priority

 

There are at least two "workarounds":

 

cmake -Be70build -DBOARD=sam_e70_xplained ...

 

or:

 

rm -rf build; cmake -Bbuild ...

 

 

 

From: <users@...> on behalf of KAY LI NG <kayli0109@...>
Date: Monday, 8 July 2019 at 19:41
To: "users@..." <users@...>
Subject: [Zephyr-users] flag for board type issue

 

Hi there,

 

I have a question.

I specified the flag for board type to build, it works.

But when i specify the flag for another board type, it still targets to the previous board. 

 

$ cmake -Bbuild -GNinja -DBOARD=sam_e70_xplained samples/hello_world

 

$ cmake -Bbuild -GNinja -DBOARD=qemu_x86 samples/hello_world

 

image.png

 

If i delete the build directory and specified the board type again, it works.

Is that a problem?

Or any other ways to simplify this?

 

Regards,

Kay Li

 

 

Join users@lists.zephyrproject.org to automatically receive all group messages.