Skip to content
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

Storage, rBoot and profile editor updates #2302

Merged
merged 44 commits into from
Apr 9, 2021

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Apr 8, 2021

Fixes

  • Unexpectedly get 'no partitions have build targets' error when attempting to build partition targets
  • Fix SpiFlash::getId() declaration (override keyword missing)
  • Change partition sort order so devices are in same order as listed
  • Fix problems when partition table offset is changed.
    Must rebuild Storage library if partition table offset changes
    Add PARTITION_TABLE_OFFSET relink dependency to rboot Component
  • Change default partition alignment to 0x1000 (was 4)
  • Add config bootloader_size field
    As partition table no longer lives directly after bootloader, size must be specified explicitly.

Editor fixes

  • Fix error in editor when file dialog cancelled
  • Fix mis-identification of core profiles in editor.
    Profiles within Library samples identified as core profile. Now only profiles in SMING_HOME or SMING_HOME/Arch/** are considered core.
  • Ensure option lists are presented in sorted order
  • Update view if 'add device' is cancelled

Editor improvements

  • Allow floating point values with size multipliers (e.g. 1.5m), and allow addresses to be entered in this style
  • Ensure selected item is visible in tree view
  • Add HWCONFIG_BUILDSPECS
    Components (SPIFFS, IFS) define their own schema for the editor to use when completing 'build' fields.
    Add example to Basic_Storage sample for how to use custom project build specs.
  • Show selected field description in status bar
  • Add scale controls for address/size fields to reduce the need for manual calculations
  • Change address/size text color if range is 0
    This emphasises that value can't be adjusted but still allows values to be overridden,
    for example to move partition to entirely different location.
  • Output partitions in address (map) order
  • Revise 'array' handling, keep 'enum' as per JsonSchema spec. which MUST be an array
  • Add browse button for string fields marked with 'filename' or 'dirname' format in schema
  • Move partitions.offset into config.partition_table_offset
    Matches defined location within JSON files

This emphasises that value can't be adjusted but still allows values to be overridden,
for example to move partition to entirely different location.
As partition table no longer lives directly after bootloader, size must be specified explicitly
@mikee47 mikee47 changed the title Update/hwedit fixes Storage, rBoot and profile editor updates Apr 8, 2021
@mikee47 mikee47 mentioned this pull request Apr 8, 2021
@lgtm-com
Copy link

lgtm-com bot commented Apr 8, 2021

This pull request introduces 1 alert when merging 999cdc3 into 967b5d7 - view on LGTM.com

new alerts:

  • 1 for Unused local variable

@slaff slaff added this to the 4.3.1 milestone Apr 8, 2021
@slaff slaff merged commit c9c8752 into SmingHub:develop Apr 9, 2021
@slaff slaff mentioned this pull request Apr 11, 2021
5 tasks
@slaff
Copy link
Contributor

slaff commented Apr 20, 2021

@mikee47 Travis seems to be back from the dead and the builds are failing after trying to compile the storage component. For example this build produces the following compilation messages. Any idea how we can fix this?

In file included from /home/travis/build/SmingHub/Sming/Sming/Wiring/WString.h:61,
                 from /home/travis/build/SmingHub/Sming/Sming/Components/Storage/src/include/Storage/Device.h:12,
                 from /home/travis/build/SmingHub/Sming/Sming/Components/Storage/src/include/Storage.h:12,
                 from /home/travis/build/SmingHub/Sming/Sming/Components/Storage/src/Device.cpp:11:
/usr/include/string.h:36:43: error: missing binary operator before token "("
   36 | #if defined __cplusplus && (__GNUC_PREREQ (4, 4) \
      |                                           ^
In file included from /home/travis/build/SmingHub/Sming/Sming/Wiring/WString.h:61,
                 from /home/travis/build/SmingHub/Sming/Sming/Components/Storage/src/include/Storage/Device.h:12,
                 from /home/travis/build/SmingHub/Sming/Sming/Components/Storage/src/include/Storage/CustomDevice.h:7,
                 from /home/travis/build/SmingHub/Sming/Sming/Components/Storage/src/include/Storage/ProgMem.h:12,
                 from /home/travis/build/SmingHub/Sming/Sming/Components/Storage/src/ProgMem.cpp:11:
/usr/include/string.h:36:43: error: missing binary operator before token "("
   36 | #if defined __cplusplus && (__GNUC_PREREQ (4, 4) \
      |                                           ^
/usr/include/string.h:53:62: error: missing binary operator before token "("
   53 | #if defined __USE_MISC || defined __USE_XOPEN || __GLIBC_USE (ISOC2X)
      |                                                              ^
/usr/include/string.h:165:21: error: missing binary operator before token "("

@mikee47
Copy link
Contributor Author

mikee47 commented Apr 20, 2021

@slaff That error looks familiar - I suspect it's got to do with multilib. Try removing the gcc-multilib package from travis.yml - g++-9-multilib will install the appropriate dependencies.

@slaff
Copy link
Contributor

slaff commented Apr 20, 2021

The ESP8266 compilation is failing and not the Host compilation, as far as I can see. But its worth trying. I will push the different changes here: https://github.com/slaff/Sming/tree/fix/travis-build

@mikee47
Copy link
Contributor Author

mikee47 commented Apr 20, 2021

It's trying to build the fscopy tool in Host mode... though yes now I see that the host build itself succeeded... weird.

@mikee47 mikee47 deleted the update/hwedit-fixes branch April 20, 2021 07:39
@slaff
Copy link
Contributor

slaff commented Apr 20, 2021

Sorry, you are right. It is indeed Host compilation happening for some reason in the Esp8266 travis build.

Applied patch contrib/ports/win32/pcapif.c cleanly.
make components application
Building /home/travis/build/SmingHub/Sming/Sming/out/Host/release/lib/clib-Storage-8fca20651dfdff62a804f3fee2480fb2.a
In file included from /home/travis/build/SmingHub/Sming/Sming/Wiring/WString.h:61,
                 from /home/travis/build/SmingHub/Sming/Sming/Components/Storage/src/include/Storage/Device.h:12,
                 from /home/travis/build/SmingHub/Sming/Sming/Components/Storage/src/include/Storage.h:12,
                 from /home/travis/build/SmingHub/Sming/Sming/Components/Storage/src/Device.cpp:11:
/usr/include/string.h:36:43: error: missing binary operator before token "("
   36 | #if defined __cplusplus && (__GNUC_PREREQ (4, 4) \

@mikee47
Copy link
Contributor Author

mikee47 commented Apr 20, 2021

The tool is built from LittleFS component. One problem with spawning a Host build is that all the Esp8266 build variables are propagated through the environment. Is there a way to spawn a 'clean' shell to do the build?

@slaff
Copy link
Contributor

slaff commented Apr 20, 2021

Is there a way to spawn a 'clean' shell to do the build?

This should work for bash

exec env --ignore-environment /bin/bash

slaff pushed a commit that referenced this pull request Sep 27, 2021
**Fixes**

- Unexpectedly get 'no partitions have build targets' error when attempting to build partition targets
- Fix `SpiFlash::getId()` declaration (override keyword missing)
- Change partition sort order so devices are in same order as listed
- Fix problems when partition table offset is changed.
    Must rebuild Storage library if partition table offset changes
    Add `PARTITION_TABLE_OFFSET` relink dependency to rboot Component
- Change default partition alignment to 0x1000 (was 4)
- Add config `bootloader_size` field
    As partition table no longer lives directly after bootloader, size must be specified explicitly.


**Editor fixes**

- Fix error in editor when file dialog cancelled
- Fix mis-identification of core profiles in editor.
    Profiles within Library samples identified as core profile. Now only profiles in SMING_HOME or SMING_HOME/Arch/** are considered core.
- Ensure option lists are presented in sorted order
- Update view if 'add device' is cancelled
    
**Editor improvements**

- Allow floating point values with size multipliers (e.g. 1.5m), and allow addresses to be entered in this style
- Ensure selected item is visible in tree view
- Add `HWCONFIG_BUILDSPECS`
    Components (SPIFFS, IFS) define their own schema for the editor to use when completing 'build' fields.
    Add example to Basic_Storage sample for how to use custom project build specs.
- Show selected field description in status bar
- Add scale controls for address/size fields to reduce the need for manual calculations
- Change address/size text color if range is 0
    This emphasises that value can't be adjusted but still allows values to be overridden,
    for example to move partition to entirely different location.
- Output partitions in address (map) order
- Revise 'array' handling, keep 'enum' as per JsonSchema spec. which MUST be an array
- Add browse button for string fields marked with 'filename' or 'dirname' format in schema
- Move partitions.offset into config.partition_table_offset
    Matches defined location within JSON files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants