- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,I use Project Creator 1.1 to create anycloud_ota_using_mqtt, but remote HEAD refers to nonexistent ref, unable to checkout.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You might be referencing to the manifest files that are not the latest. This could lead you to the error "remote HEAD refers to nonexistent ref".
The code example AnyCloud_OTA_Using_MQTT are presenting nicely at github.com, see below:
Try to download from github.com directly and import it to the workspace of MTB, using Import Wizard.
And then remember to run the command "make getlibs" from the root of the project directory, to get all the libraries loaded. This step is always required by MTB projects when they are firstly imported, which is automatically and silently executed when using Project Creator to create the MTB projects. And it is the root cause that often leads to the error "terminated with exit code 2".
Please refer to 4.4 make getlibs in ModusToolbox User Guide, for detailed instructions.
-------------------------------------------------------------
///Add some new findings///
This code example also requires Python to be installed on your system and can be called system-wide. So correctly install Python 2 / Python 3 first, or you could be dealing with errors.
And then you could still be facing the following errors:
Create unsigned.hex
imgtool create signed .hex.
imgtool.py create -R 0 -e little --pad-header --align 8 -H 0x400 -M 2000 -v 1.0.0 -L 0x00012000 -S 0x000EE000 ./build/CY8CPROTO-062-4343W/Debug/mtb-example-anycloud-ota-mqtt.unsigned.hex ./build/CY8CPROTO-062-4343W/Debug/mtb-example-anycloud-ota-mqtt.hex
Traceback (most recent call last):
File "./libs/mcuboot/scripts/imgtool.py", line 17, in <module>
from imgtool import main
File "C:\Test\mtb-example-anycloud-ota-mqtt-master\libs\mcuboot\scripts\imgtool\main.py", line 23, in <module>
from imgtool import image, imgtool_version
File "C:\Test\mtb-example-anycloud-ota-mqtt-master\libs\mcuboot\scripts\imgtool\image.py", line 25, in <module>
from intelhex import IntelHex
ModuleNotFoundError: No module named 'intelhex'
make[1]: *** [libs/psoc6make/make/core/build.mk:508: CY_BUILD_app_postbuild] Error 1
make: *** [libs/psoc6make/make/core/main.mk:353: secondstage] Error 2
"C:/Users/chlw/ModusToolbox/tools_2.1/modus-shell/bin/make CY_MAKE_IDE=eclipse CY_IDE_TOOLS_DIR=C:/Users/chlw/ModusToolbox/tools_2.1 -j8 all" terminated with exit code 2. Build might be incomplete.
From the log you can see that "ModuleNotFoundError" can also lead you to the error "terminated with exit code 2". To solve this, you have to pre-install all the python modules, following Python rules.
For example, the log above shows that "No module named 'intelhex'", which tells us the Python module intelhex cannot be found. Then we can execute the following command to install the module intelhex:
pip install intelhex
All the prerequisite modules I can find should be “cryptography, intelhex, click, cbor”. So you can run the following command to install them once for all:
pip install cryptography intelhex click cbor
Best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
I create this App by offline, but build error as follow:
make[1]: *** [libs/psoc6make/make/core/build.mk:508: CY_BUILD_app_postbuild] Error 1
make: *** [libs/psoc6make/make/core/main.mk:350: secondstage] Error 2
"C:/Users/shzzn/ModusToolbox/tools_2.1/modus-shell/bin/make CY_MAKE_IDE=eclipse CY_IDE_TOOLS_DIR=C:/Users/shzzn/ModusToolbox/tools_2.1 -j4 all" terminated with exit code 2. Build might be incomplete.
14:11:57 Build Failed. 2 errors, 7 warnings. (took 11m:10s.724ms)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Search the "terminated with exit code 2. Build might be incomplete" and check if the existed discussion can be helpful?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You might be referencing to the manifest files that are not the latest. This could lead you to the error "remote HEAD refers to nonexistent ref".
The code example AnyCloud_OTA_Using_MQTT are presenting nicely at github.com, see below:
Try to download from github.com directly and import it to the workspace of MTB, using Import Wizard.
And then remember to run the command "make getlibs" from the root of the project directory, to get all the libraries loaded. This step is always required by MTB projects when they are firstly imported, which is automatically and silently executed when using Project Creator to create the MTB projects. And it is the root cause that often leads to the error "terminated with exit code 2".
Please refer to 4.4 make getlibs in ModusToolbox User Guide, for detailed instructions.
-------------------------------------------------------------
///Add some new findings///
This code example also requires Python to be installed on your system and can be called system-wide. So correctly install Python 2 / Python 3 first, or you could be dealing with errors.
And then you could still be facing the following errors:
Create unsigned.hex
imgtool create signed .hex.
imgtool.py create -R 0 -e little --pad-header --align 8 -H 0x400 -M 2000 -v 1.0.0 -L 0x00012000 -S 0x000EE000 ./build/CY8CPROTO-062-4343W/Debug/mtb-example-anycloud-ota-mqtt.unsigned.hex ./build/CY8CPROTO-062-4343W/Debug/mtb-example-anycloud-ota-mqtt.hex
Traceback (most recent call last):
File "./libs/mcuboot/scripts/imgtool.py", line 17, in <module>
from imgtool import main
File "C:\Test\mtb-example-anycloud-ota-mqtt-master\libs\mcuboot\scripts\imgtool\main.py", line 23, in <module>
from imgtool import image, imgtool_version
File "C:\Test\mtb-example-anycloud-ota-mqtt-master\libs\mcuboot\scripts\imgtool\image.py", line 25, in <module>
from intelhex import IntelHex
ModuleNotFoundError: No module named 'intelhex'
make[1]: *** [libs/psoc6make/make/core/build.mk:508: CY_BUILD_app_postbuild] Error 1
make: *** [libs/psoc6make/make/core/main.mk:353: secondstage] Error 2
"C:/Users/chlw/ModusToolbox/tools_2.1/modus-shell/bin/make CY_MAKE_IDE=eclipse CY_IDE_TOOLS_DIR=C:/Users/chlw/ModusToolbox/tools_2.1 -j8 all" terminated with exit code 2. Build might be incomplete.
From the log you can see that "ModuleNotFoundError" can also lead you to the error "terminated with exit code 2". To solve this, you have to pre-install all the python modules, following Python rules.
For example, the log above shows that "No module named 'intelhex'", which tells us the Python module intelhex cannot be found. Then we can execute the following command to install the module intelhex:
pip install intelhex
All the prerequisite modules I can find should be “cryptography, intelhex, click, cbor”. So you can run the following command to install them once for all:
pip install cryptography intelhex click cbor
Best regards