New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tools: Fix Python3 + firmware header traeback #8330

Merged
merged 1 commit into from Oct 9, 2018

Conversation

Projects
None yet
5 participants
@theotherjimmy
Contributor

theotherjimmy commented Oct 4, 2018

Description

Traceback:

Merging Regions
  Filling region bootloader with mbed-cloud-client-example/mbed-os/features/FEATURE_BOOTLOADER/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/TARGET_FRDM/mbed-bootloader-k64f-block_device-sotp-v3_4_0.bin
  Padding region bootloader with 0x9a4 bytes
Traceback (most recent call last):
  File "mbed-cloud-client-example/mbed-os/tools/make.py", line 293, in <module>
    ignore=options.ignore
  File "mbed-cloud-client-example/mbed-os/tools/build_api.py", line 548, in build_project
    merge_region_list(region_list, res, notify)
  File "mbed-cloud-client-example/mbed-os/tools/build_api.py", line 423, in merge_region_list
    _fill_header(region_list, region).tofile(header_filename, format='hex')
  File "mbed-cloud-client-example/mbed-os/tools/build_api.py", line 380, in _fill_header
    header.puts(start, struct.pack(fmt, time()))
struct.error: required argument is not an integer

reason: time() returns a float. So the fix is to force it to be an int.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change
Tools: Fix Python3 + firmware header traeback
### Description

Traceback:
```
Merging Regions
  Filling region bootloader with mbed-cloud-client-example/mbed-os/features/FEATURE_BOOTLOADER/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/TARGET_FRDM/mbed-bootloader-k64f-block_device-sotp-v3_4_0.bin
  Padding region bootloader with 0x9a4 bytes
Traceback (most recent call last):
  File "mbed-cloud-client-example/mbed-os/tools/make.py", line 293, in <module>
    ignore=options.ignore
  File "mbed-cloud-client-example/mbed-os/tools/build_api.py", line 548, in build_project
    merge_region_list(region_list, res, notify)
  File "mbed-cloud-client-example/mbed-os/tools/build_api.py", line 423, in merge_region_list
    _fill_header(region_list, region).tofile(header_filename, format='hex')
  File "mbed-cloud-client-example/mbed-os/tools/build_api.py", line 380, in _fill_header
    header.puts(start, struct.pack(fmt, time()))
struct.error: required argument is not an integer
```

reason: `time()` returns a float. So the fix is to force it to be an `int`.

### Pull request type

    [x] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Functionality change
    [ ] Breaking change
@0xc0170

0xc0170 approved these changes Oct 5, 2018

@0xc0170 0xc0170 added the needs: CI label Oct 5, 2018

@studavekar

This comment has been minimized.

Collaborator

studavekar commented Oct 7, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 7, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 8, 2018

PR was hit by network license issue early last week. Will restart when able.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 9, 2018

/morph export-build

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 9, 2018

Whoops.

/morph build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

mbed-ci commented Oct 9, 2018

Build : SUCCESS

Build number : 3286
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/8330/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Oct 9, 2018

IAR network license issue.

/morph export-build

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Oct 9, 2018

@cmonr

cmonr approved these changes Oct 9, 2018

@0xc0170 0xc0170 merged commit 4a0e2bd into ARMmbed:master Oct 9, 2018

14 checks passed

ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Passed, 626 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 9876 cycles (-55 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8372B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@0xc0170 0xc0170 removed the ready for merge label Oct 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment