Now the data validation will be the first and mandatory steps for any generator cmds run. Data record which violates the schemas will be reported as “errors”.
Generator also supports direct “data_validate” cmd that just validating the data.
For example, if you run ruby sdk_frdmk64.rb -c data_validation(Please comment the -c project in that rb), you will get error logs like
- The property '#/component_info/common' did not contain a required property of 'full_name' in schema D:/git_sdk2.x_featuretry/mcu-sdk-2.0/bin/generator/sdk_generator/data/sdk_data_schema/definitions_schema.yml#
- The property '#/component_info/common' did not contain a required property of 'description' in schema D:/git_sdk2.x_featuretry/mcu-sdk-2.0/bin/generator/sdk_generator/data/sdk_data_schema/definitions_schema.yml#
The left work about the schemas:
Need “example” and “description” for all properties in the schemas to illustrate how to write ymls
Missing some properties
Update current SDK data to fix all the errors.
When the schemas are 100 percent,detailed training and introduction to all SDK developers.
About json schema, you can quickly learn fromGetting started step by step, won’t consume you too much time. It is a mainstream and popular solution for json/yml data annotation and validation.
Please run “gem install json-schema” before you run. You can try “ruby sdk_frdmk64.rb -p hello_world” in the 1390 integration branch.
Generator has supported project generation for CodeWarrior Development Studio. This feature is mainly for Nevis3 SDK development and integration. The yml prototype has been prepared in release/2.7.0_nevis3_ear branch, the generator branch is develop/mcu_sdk_generator. Here is an validation demo hello_world. You can run batch command after putting source code into repo. Here is an example:
After project generated, you can import the project into your workspace, just a kinder reminder, do not select "Copy projects into workspace" option.
After building successfully please select correct debug configuration to debug your project.
SDKGEN-1465 Support preinclude header file for mucx linked and project
When import a project into mcux, there are two kinds of preojects depends on whether "Copy Sources" checkbox being cheked:
Linked project(no check)
Preinclude files worked only with copied project in the past. Now both types can be supported at the same time.
The default setting is copy sources type. You can add an additional attribute "linked_support: true" for the file to enable the feature.
SDKGEN-1485FAQ about how to remove/replace single flag.
Sometimes you just want to remove single flag, "__remove__" tag can be used. For example:
Further more, if single flag needs to be replaced, you can firstly use "__remove__" to remove them and then add a new one. Thus other flags will not be affected comparing with "__replace__". For example:
Note: You must add flag node as "__remove__" 's sub-node first, then add the flag to be removed under the flag node. Don't try to remove an item as this way: