I can see in Segger Embedded Studio v4.52 under the Build Tab, there are two methods to build the project.
1- Build > Build zephyr/zephyr.elf
2- Build > Build solution
What is the difference between the two methods?
Kind regards
I can see in Segger Embedded Studio v4.52 under the Build Tab, there are two methods to build the project.
1- Build > Build zephyr/zephyr.elf
2- Build > Build solution
What is the difference between the two methods?
Kind regards
Hi!
The answer to your question has to do with the difference between "Solutions" and "Projects". Here is the SES documentation for this.
So "Build zephyr/<file>" builds a single project. Note that when building an application with a single image you will see this option ("build zephyr/zephyr.elf") while if you try with a multi-image application you will see "build zephyr/merged.hex". )
"Build solution" builds all the projects in the current solution, as it's possible to have several independent projects in one solution.
You can also read about Zephyr's build overview in Build Overview.
Let me know if this answered your question!
Best regards,
Heidi
Thank you Heidi.
I tend to build under Segger Embedded Studio, so, all the steps are hidden away. But it is good to be aware of what is going on in the background just things go wrong.
Looking at the example 'light controller' solution I can see many projects but the build shows only Build zephyr/zephyr.elf. There is no mention of the zephyr/merged.hex.
Which file in the build process tells SES that we are building a single or multiple images?
Kind regards
Mohamed
There's not always a straight forward way to see if a project is a single-image or a multi-image build.
With regard to projects made for the nRF9160 SiP, all projects that require you to build for the non-secure board (nrf9160dk_nrf9160ns) are multi-image, as they all include the Secure Partition Manager as the child-image. This is usually mentioned in the documentation, and you can also check after the project has been built if there is a directory called "spm" in the build folder.
When you say "light controller" example, do you mean the Bluetooth Mesh Light Controller? This is a single-image application, which you can check from the build log where the linker was only run once.
See when and why to use multiple images, specifically this sentence:
Therefore, if you want to determine if you have zero, one, or more images, count the number of times the linker has been run.
The page "Building and configuring multiple images" explains a bit more on this topic.
Best regards,
Heidi
Thank you Heidi for your comprehensive answer.
The light intensity controller project I am using is part of this tutorial
nRF Connect SDK Tutorial - Part 2 | NCS v1.3.0
For some obscure reason the project has stopped working. I am getting this error when I try to open it in SES.
Here is the log,
Loading solution light_controller.emProject
Executing load commands
cmake -GNinja -DBOARD=nrf5340pdk_nrf5340_cpuapp -DBOARD_DIR=C:/Zypher/v1.3.0/zephyr/boards/arm/nrf5340pdk_nrf5340 -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=C:/Zypher/v1.3.0/toolchain/opt -BC:/Dev/NCS_projects/light_controller/build_nrf5340pdk_nrf5340_cpuapp -HC:/Dev/NCS_projects/light_controller -DDTC_OVERLAY_FILE=C:/Dev/NCS_projects/light_controller/nrf5340pdk_nrf5340_cpuapp.overlay -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:/Zypher/v1.3.0/toolchain/segger_embedded_studio/html/configure_nordic_project_menuconfig.py
Including boilerplate (Zephyr base (cached)): C:/Zypher/v1.3.0/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/Dev/NCS_projects/light_controller
-- Using NCS Toolchain 1.3.0 for building. (C:/Zypher/v1.3.0/toolchain/cmake)
-- Zephyr version: 2.3.0-rc1 (C:/Zypher/v1.3.0/zephyr)
-- Board: nrf5340pdk_nrf5340_cpuapp
-- Found west: C:/Zypher/v1.3.0/toolchain/opt/bin/Scripts/west.exe (found suitable version "0.7.2", minimum required is "0.7.1")
-- Found dtc: C:/Zypher/v1.3.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/Zypher/v1.3.0/toolchain/opt)
-- Found BOARD.dts: C:/Zypher/v1.3.0/zephyr/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_cpuapp.dts
-- Found devicetree overlay: C:/Dev/NCS_projects/light_controller/nrf5340pdk_nrf5340_cpuapp.overlay
Error: nrf5340pdk_nrf5340_cpuapp.dts.pre.tmp:670.7-19 syntax error
FATAL ERROR: Unable to parse input tree
CMake Error at C:/Zypher/v1.3.0/zephyr/cmake/dts.cmake:195 (message):
command failed with return code: 1
Call Stack (most recent call first):
C:/Zypher/v1.3.0/zephyr/cmake/app/boilerplate.cmake:505 (include)
C:/Zypher/v1.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
C:/Zypher/v1.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
CMakeLists.txt:3 (find_package)
-- Configuring incomplete, errors occurred!
Project load failed
Reported error: solution load command failed (1)
Here is the log,
Loading solution light_controller.emProject
Executing load commands
cmake -GNinja -DBOARD=nrf5340pdk_nrf5340_cpuapp -DBOARD_DIR=C:/Zypher/v1.3.0/zephyr/boards/arm/nrf5340pdk_nrf5340 -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=C:/Zypher/v1.3.0/toolchain/opt -BC:/Dev/NCS_projects/light_controller/build_nrf5340pdk_nrf5340_cpuapp -HC:/Dev/NCS_projects/light_controller -DDTC_OVERLAY_FILE=C:/Dev/NCS_projects/light_controller/nrf5340pdk_nrf5340_cpuapp.overlay -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:/Zypher/v1.3.0/toolchain/segger_embedded_studio/html/configure_nordic_project_menuconfig.py
Including boilerplate (Zephyr base (cached)): C:/Zypher/v1.3.0/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/Dev/NCS_projects/light_controller
-- Using NCS Toolchain 1.3.0 for building. (C:/Zypher/v1.3.0/toolchain/cmake)
-- Zephyr version: 2.3.0-rc1 (C:/Zypher/v1.3.0/zephyr)
-- Board: nrf5340pdk_nrf5340_cpuapp
-- Found west: C:/Zypher/v1.3.0/toolchain/opt/bin/Scripts/west.exe (found suitable version "0.7.2", minimum required is "0.7.1")
-- Found dtc: C:/Zypher/v1.3.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/Zypher/v1.3.0/toolchain/opt)
-- Found BOARD.dts: C:/Zypher/v1.3.0/zephyr/boards/arm/nrf5340pdk_nrf5340/nrf5340pdk_nrf5340_cpuapp.dts
-- Found devicetree overlay: C:/Dev/NCS_projects/light_controller/nrf5340pdk_nrf5340_cpuapp.overlay
Error: nrf5340pdk_nrf5340_cpuapp.dts.pre.tmp:670.7-19 syntax error
FATAL ERROR: Unable to parse input tree
CMake Error at C:/Zypher/v1.3.0/zephyr/cmake/dts.cmake:195 (message):
command failed with return code: 1
Call Stack (most recent call first):
C:/Zypher/v1.3.0/zephyr/cmake/app/boilerplate.cmake:505 (include)
C:/Zypher/v1.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
C:/Zypher/v1.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
CMakeLists.txt:3 (find_package)
-- Configuring incomplete, errors occurred!
Project load failed
Reported error: solution load command failed (1)
Hi! Could you please attach your project as well? :)
Here it is zipped up. change extension to 7z.
Note, It was working fine this morning.
7z��' �Lb # ��v��L�] ���\�����g�+mRG�ԽN����ڠq�؏c�r��~�z�S&F@���`��-�ܱ�Gpj%EF%x#DI��s�9��#�M�fr�%�]y�q"s%��O����M��SGR��sdU�m����ǤB��0��_g���]S58sIz����K�h���8{,f�&�XL����qnۯ\�e}�c�����uG1M�F��I��g8���R��Su�]����E�?|19yɠL�ѵ�i�dP�q ��n!:��������7W�t}�^}Ty��M� �Q�p�l��Yy��2G���V[W��`��;�$G�����H����Գ��T�FJ�k��^�gN������?�����?��SLyZh��P�ҏF�1!�<wm�c���/ˡ���wo�M���^d6�_}K9��:��j�(�t8Y$�Q�B���H��0t;w�l�Άw�oW� .$݈��_H�����LA���玦�}�,[�,�������Lq�1a���7��P�G~�tq[r$6�/羧� �ZK���"��W��=�`!��ZU���������yS�Cw�g�_�#�2I(<S��d�l�HQ�v�9T3�MG�8[p�TK�h!H�L)�|�|�� ��9�pl�yj��m�|u�se�\��_N����:W~dw��b��&��a��Nc"������q�Zf��^�Q��sצg4�W&�'���'G��)|�.�v�����ט�N��Ġ[�Ċ��'��0�q?�BF�a��ܸ�_Ru3q���[K�̥�F�`��Cy \7� \i���Y��h���r�)�7��� o���1�(�6�a^��#$���Is�Oj�k3'��Eb�wM�Wy ���4�L�_��L ��Tx�n�::�����N���^y:��C��cƻ #��F�)���%Y$=YKgV���wW��<�S�]�%_�.��Vq)�Ԭ�䓡@����C�f�`����]��K��O��O�L`N��S:*��=�_�'�/�y�@H� ����-8���a��:o��@F3�9]�K�?�J��r���/9��������SO'�w?D�����E��6�Y�qa�J�=������"�����.yU2,8�ݼ��,�"G ����:c���q`��eѥ�B�;0�Va$\m?~ ���l����z�����̸d{�YIc���PC�W6 7 ��$ց>�z�0��Gck��.5���lM�0��͊�|��Y�o���*�ٖ�ӹZ+�O�!��M-��z�Sw R��=E�K;�&�Hx�]��R������q� ����d��%v&2�,���P���~G�𤧈��h�9m�Xx�O��&M�/b�(�b����v����4�H��|ha3s��j��C�y�ʲ�����؞�~�lﳽw!�YR��v��q7Y�n���li�vt�MH=G�I�G/���G��msWPʥ佅c.3#���T< �궍���;�$�'�4�d贀϶T�;��"�̿I:�D�������.ZHV��4-�Wx&cA0����#��zh0-��j���/d�������Ѽ�!yFx"�6��X�``��ƝI��>����� �Yw�6���:���~��tpR� �Wǖ:�H��I���dxSQ���@��!�E����[{P��?5ί=������]��9X�]�|s��RWi�m����@#$�Z.�q�i�����#RSwB�>�nb�z/���N�w:>h�H`�� ���m��e�l�x�}�lQϰ�k!V/�z:�z�������V~�*��0����/���v��~�䗗���%^?B�qg;_l#���4q�A0�c&��S=*�3�s"�_�e)i�hɊ�H�q���H���(��X�/T��H�wc(ht�o��*���&G}+<�`^e8s;�� �XY�@˯��>����n8��w,l5�[*$kc�[��!�8���+i���Y� 0�q��0���;)�r�WMZ��e��L��IP#v �Pl�[�d�B����L{afS��@�{.���q���mܙ CLU��Z���ś�j'����O��Dm��4]�i�.U�L�����$X�;Wtn�vwj)@5�+t�Ƣ(�W�W��\J����� ��T�裓ԐEŭ�{;m�L�ޅ����:�pdݙ��&��$����U���a�OVH�샶�B�M���� �A���%"P�^�ٛ��C!��^Vz�Hp��ڣ�#�-#��] m5����J��G!͆�D�]��V,I��� ��m���r�k���� ���'_� -@#�I��6�F�7j��U����?�7�� �~�w @1�^���o%��~���<6)�� �%���^��4��R�m��U�J�<�x��M �SL�Uߣ��`� �o�(i_����5&DΡ-�pM�u��Q3�����M������E���Q��!#�<�u\�#0��+��'q���}T� 1I���Xo�_�~�F�`"]��V��mx忝�����fx�Z8G,-���} �q� eɀT�v��r�{�҂M�<`����L�=���o:=��'��|�g㛁�d���B))��H� k�ւc<i~,M=�@�����X�ʀyN+��;��ʣ�B1����cp�7z�)���D7pě%�N���$�Yx��@7�����,Uhj'�ȅg5�ni��[ ~�JS�>�y2u�I�d��c�!��G�2�+uZ�u@����|�&��ȫR�� ?���,��g�Y�^_�>A�R��-�?��P4n���"\]=.���i��e�F���� rn�V���W�k� )>���b-���!/��-���X �Z�����?��̃�S���=4p}���~쩚K�����u�n �ƉK��Gn�u��Z츳��^���1�L�u����x��Z��DF� ����|u�L� ���4�[��濕/$���Ҙ��ͥ ���d�,U���юnH�?(�F_�ꦇ� %� S���T���R�y3 D�+Un�����L�����W��aw ���#WxF�|'�������)8�f�����C�'��~�3�8���q����3�v,�n��$`E��"�� �RTe�vr��:�X/����� �{ȉm?Ɠ���j�oڣ�>�� �ޫO��۷�fk���Zy�aZ�>-����J;p��G�0�.`1�Vso�<�ަ�n,�6}�A��-�ά��t{����%az� �o��C��S������/��e� ����$Ѥu)�%6�[�I��t�A��uV��f@�~%_oV���cqm �ח�V����c{t$� ��e��>�$W/�-�B�'i�?����Ϛ.{�)�_���#�Za�I���6�E:����v�bMb;7<(�tu�{�!����Ťq�O�Q���R��.�u�-� S�)@��!sg�����? 5/�����o�}�뤥<'${ZG:x��m��/jn�:��~U� ��1�=~e%R۰�?�D/�l��5C���\j��m�r�� ���7[�����tWl*�-J�r�ܸwoW+�tov�+��t ����x���Kv��2.|�žJ!,�*�~xW�7��I���9j`�׀d�QUI�'��TM6��WB>d�%NH ��J�3��!�����L��T\�� r�t]�!�a�I�{���//l'�Z��=���[��~&�/�)Gm�_�Q��q��^�3�,@���;� ��\tj~�gBW$]�Yѷ��A䧃�R ge�pk.��-]7�0VwI�����F��Y^A��@*��ү�wBc<�߸т_�}�ȡ%��_�� h4�_�{q�!<1Ժ�Ol ��*I�j��W�~�� �n����3������ح�H��h��SU<M�HQy������ ڷLR��Րg#�Bg�d�A��15� ~�ģ�3LGބg��7t�D�Ur�� ��ᆯ �+�fVP���*�|&�(P��*LB���х��ᬓl�K����<���.�?�I� SV�,���g!6ԝ -�����D�RsUc<_�e�K���W�U��2�h1F;����Ԩk��K��������9 nGf�TL�{9n^�ҋ���ax��;(��%��/n��� �J�s�Bp�a�/����+s�{ݐo�WL�s�Q�F|��͏�#Hbw+��s�L)�I��� Oˏ�Y�^ �� �GT���P��~�:��r��g<4���Jx�$����-͵P�J��q�=��>��b�.���!�<�v���9�EK�E��~I�͒"����M�.� �N�ˎ@Q���tH���,�C9{?w��4�L�T��J;��=�I�?6D]&7#s�Lo�s/��\�`��Y�N�ݸU�}���P��<���ݕK�Q�"\�*�z0�ݐ?eKoX� &� ��\�qy��a������8M,aݩ&��C�����Q��y�i�t��������X��0%&�q�(��Y��������ՠN���#ׁ+휆uVo�A mUj�JCÀ���xU��Z��A���2Q��9�ꎿ���1eB���J�w�,aO�L�+�J�S=�Y������τ������s�ڴ'�4��v���Deӫ�:��VoD�]�����ԛ�O�d�ǨCВ��B��-��;�[Z�Ǎ� �C�����GL�_&�T��(pb���� džʧ�ٯ�;;�!.%�FfP�W��w,���p^"Б��^4��ҽ�]%����"~�����q� ��q���u�N�y'Y�ݚ��:�O��b��ٗM�d�)�$��/��T�+��D�B��>�_��2�2�]h@���6�42Q;�Dc����Rz�y�x*����yV.!Xf���^c�(+�%��>2%q|@�1�-,�F����Նv����yj3���8=@��S[~o�Bn�|i�-,��h�- �<7m�T �;�|"x�mU�Q�6N:��j+����F��c()��Z��<�>�5�q/�mު�i�~̑���O&�'_1��r�`�E��2�Q�P �� q2�� �ES/���xD_z(�{m��I�%Et������Y�e�7���u�c5پ\�y3'RkՔ�*XXZ����f����7�;�/zRKO�UMW�����|��Y�r���s��'{t��(�#%�&�y������GRCх&7H��A�}�����p6�� d7�{W��67묖9V��&�zks��+O�r���D`ލ � �Rɂ�����TL1���{@�~�*�qY�;�9(Ҷ�q4��� V�O�?�>����?'2���A_f-Z���)N�����\�KB�G����A=�#O7k�Y�Ѓu�:��=Ÿ��w���� ���} 릈[�6[Glr�7�n�Ɵk� vp�H�U`� jc�p'A�~�t�҂�Z�Ylq�%��f�t�(��Sl�y�O.��+'�cj`,9���b��p�X�8q�s�|��]�*-��o�3�י �c�] ��j�ݖ��*�U��[����'X�� �[rU�rʳf���ۋiE:�4L�[��;����W\�'0p<9C��lФU5��r>5Kz�|�a�fy��9)Su6C5��t��i�~���۬��AC �;��m�5 ��Tc�f1�������EC�T�p�J9��\���Fw +"| �Z3�o�,�n�cbGf���~MqR ����ݓs�����*�W5*U��53&��ȍu��� ��b�:��-��\ *����%Mm�'���=D�m�c�� �c����fMz�y*�*���5�շ�&����+(�[tdy��yj��Z;j����� |� ~��lNZ UN�~�x؈W��'H� �Q[���JR����L)�� ~x�!w��Q�1���q�~�� 'P�v�e�ZM;*t���D�L�W${�^�jˮ`6[U��Y�7B&��Oay�a ��\��==����7�| �h|��I�#�� �����\���Y����ң�)�L@�y`�;c!�K �G�SJ� |�wOo)�u��06��{������E�Þ�*� �A��'�Ut�� l���5�����F����oFQ���9^�~�m�TG^g��"k#>��:�8�1�9��� X>K��)�6��%�����b�ge���tc�%��F� A>+e��;JW���Ƿ�I��+V ���?>�����pC~�8�ᑅ2qU]� �Ý<1��ލ�$k��67�%��ܫH�|U@tv$,�O[���Pt�3vIiOe<M����:�����A�#�6pU`#a��@��$3@�:�)��-M�"K�A.���_Iؒ)$ƾiK�B!��Qzw�J+�Y�zÝ�(� �t��u��n�=�+��������uR�"��+tTF;LAk�Wu�X"n�bq�v�q*�³.�DE��)�i�v�2�ܚZv�r4��l�m���z��H�q����̏Ӣ8�����Ą�K@ͧQ��� �"N/c�E~����#���M3�[�ؠMB���'��ɢ`��j����� ,��i�نl�7K"�za~�������5����&W1g�e�<�K��5��uƲny�}�����YGف�v4I�)a>���y��/�!�z�u^�f�A�n߂�<�"g�'����:1��/|T�&�&_��P�6���Ŷ��QջĘR��ې��q��j�"Lᖠ�f1ᒁ�� D=t�h�^~��3��ϸ)@2r��T�m-hn�y�����I�������5 )��`ѱ~Mz0?7t^���%R^�д�4�|���$#(_��.)q0�>�����E#G^xf��8����b��"����̪nBdڭmf�e$W`x����>��ᴣSGB�G����sw�p&E���[^�{X5����iWs<�0-�e��x�*?�i ����"��'u�[jM�|w �r &�ǩΟ�KT��s����o{p� UJ8��SM0A�7G��2c�-�ߦ��"�}� N3�^��7 �D<ukj#���.c�Y�NSg�NC�!�7=6|�0�Bb�r3�lʗ��N8���~K�U�ZVOs [��1���]7�&ư����w>}�P*�}ْ?�i���s�w�-@Nƪ����=�13S�3��[��|�D� �3��d�Vl)H��R^�x�c�pe��O��7x������@�P��B����%��ן�磊��^���H�'���>���k#(bd" �|�[4Vݜ�Be�?�݃%9"�]�7����h2x��=�+ �u���:��ԟ��?tI����j�EI� ?(Y�]�}���dE�Ւ�,p���/�"�i�s�D�m�laمZ�$:� �o�)��ͷڰ���_�ɳ2>h�c'��� �[��:���, �����w�+_����[�%U�7�ATl��b�7��i6���P+����)� <�C��oA���+�"%��0�d�=\= �KJ6ܵ�'P�H�Q�7ܤ��zG���O���n�^�����8l�؏�5H�G%�S���a��N�3�nc�3�P���M.��S�8M���)���"m 8����I}uj�>��&� -����axo�t�(N�-�G��6�.ٶ�kB/�1�a'�6��i?���EV�կCP�ÒQ�������+����`�:�}ƅ��G�g;D�b��W�F[O�q�C��������8<�H��]]�����t]a ��K����p#�=�-q~�\^b.^���E��V�� �z #] �� �O^
Good morning Heidi,
Any update on why the light intensity controller project stopped loading?
I restarted my machine and tried to re-load it this morning but it is still failing to load with the same error message. I already sent you the zipped up project. Thank you.
Kind regards
Mohamed
Hi!
The problem with your sample is the .overlay file. That isn't the correct way to set up the ADC peripheral.
However, I'm still working on finding a solution to this and I will get back to you later on in the week.
Best regards,
Heidi
Hi Heidi,
Spot on!
I managed to get the 'light intensity controller' project to load successfully. This is what I did: I deleted the content of the build folder and got rid of the overlay DT overlay file. However, I do need to the overlay file and I am eagerly looking forward to your solution.
Thank you.
Kind regards
Mohamed