Skip to content

Add target C030_R412M #23

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

Closed

Conversation

wajahat-abbas
Copy link
Member

Added support for C030_R412M board. Example is running and tests are passing as well.
Some issues are under discussion here.
2019-09-13_160248.zip

@anttiylitokola
Copy link
Contributor

Can one of the admins verify this patch?

@fahimalavi
Copy link

Anything u-blox can do on this pull request ? @MarceloSalazar

@yogpan01
Copy link
Contributor

Hi @wajahat-ublox we only accept board specific configuration on this example. mbed-os lib hash is maintained by Arm team and always point to some official release tag.
Is your PR dependent on a particular mbed-os version?

@wajahat-abbas
Copy link
Member Author

wajahat-abbas commented Sep 19, 2019

@yogpan01 Yes the hash is for mbed-os 5.13.4 release. I am getting build error with the mbed-os version set in this repository.

@MarceloSalazar MarceloSalazar added new platform WIP Work in progress labels Sep 25, 2019
@MarceloSalazar MarceloSalazar self-requested a review September 25, 2019 13:29
mbed-os.lib Outdated
@@ -1 +1 @@
https://github.com/ARMmbed/mbed-os/#7482462434d5cf718177653ef797547a976a7c5e
https://github.com/ARMmbed/mbed-os/#1bf6b20df9d3cd5f29f001ffc6f0d0fcbbb96118
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Master is now on 5.14.0 so this is not needed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will test again on 5.14 and remove this.

mbed_app.json Outdated
"UBLOX_C030_R412M": {
"target.macros_add" : ["MBEDTLS_USER_CONFIG_FILE=\"mbedTLSConfig_mbedOS.h\""],
"target.network-default-interface-type" : "CELLULAR",
"target.bootloader_img" : "bootloader/mbed-bootloader-ublox_c030_r412m-block_device-kvstore-v1.0.0.bin",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version usually has been pointing to mbed-bootloader version, I presume this is not that old?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were not aware of the naming convention followed but yes bootloader was created recently with version v4.0.3. I will rename it. Can you share what naming convention is followed generally?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not been documented anywhere, as far as I know. Need to add this to the backlog of things and get it sorted.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@teetak01 teetak01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How big images are on this target? It is possible to fit it to internal flash with the update, or does it require significant space for the stack?

@wajahat-abbas
Copy link
Member Author

@teetak01
The pelion example binary is 456KB. Internal flash is 1MB so i doubt we can fit everything in to internal flash. Also if customer uses this example for our boards then his binary will be even larger and he will have use the SD card any way.

@teetak01
Copy link
Contributor

These examples definately are not for product-level examples, but for simplest on-boarding. Minimizing the dependencies (like external storage) simplifies this. Also removing dependency to external storage also makes the binary much smaller as it does not need to pull in sd-driver.

But I am fine either way.

@wajahat-abbas
Copy link
Member Author

@teetak01 @JanneKiiskila
I am testing with mbed-os 5.14 but getting some problems. The tests are passing when network interface is set to ethernet however the test deregister fails on cellular.

If i understand correctly, the test cases uses connect APIs to do a POST on resource 5000/0/1. I checked the printf logs and it seems that POST was received and executed successfully:

Initialize KVStore
Connect to network
Network connected with IP 

Start developer flow
Create resources
Register Pelion Device Management Client

Client registered.
Account ID: 0168e10722cf12dc3bb0a40300000000
Endpoint name: 016d861a099400000000000100100131
Device ID: 016d861a099400000000000100100131

PUT update 0
POST executed
PUT update 0
PUT update 0
PUT update 0
POST deregister executed
Unregistering and disconnecting from the network.
Client unregistered.

However the test case times out and generates failure. I am attaching complete log as well.
I tried sending POST manually from portal however it fails with the following message and device remains registered.

The resource has returned an error for this request. It may not accept the chosen method or is not editable
2019-10-01_122204.zip

@MarceloSalazar
Copy link

@wajahat-ublox

I am testing with mbed-os 5.14 but getting some problems. The tests are passing when network interface is set to ethernet however the test deregister fails on cellular.

This is suspicious and lets me think that there might be a problem with the network.

Can you please run the integration tests that we've introduced in Mbed OS 5.14?
https://os.mbed.com/docs/mbed-os/v5.14/porting/integration-tests.html

@wajahat-abbas
Copy link
Member Author

@MarceloSalazar
Thanks, i will run these tests with mbed-os 5.14 and report back. Meanwhile if you look at the logs, the devuce did receive the POST request and deregistered gracefully but test case still reports failure.

@teetak01
Copy link
Contributor

teetak01 commented Oct 1, 2019

It is quite possible that the POST response to the server did not leave the device before it disconnected the network.

We did similar fix for mbed-cloud-client-example, but we need to see if we want to add a bit more complexity here: https://github.com/ARMmbed/mbed-cloud-client-example/blob/master/main.cpp#L135-L139

@wajahat-abbas
Copy link
Member Author

@teetak01
Thank you. This seems like the problem, i will modify main with the approach you shared and see if it helps.

@wajahat-abbas
Copy link
Member Author

@MarceloSalazar Integration tests are passing. Please rename the file to .html.
R412M_int.txt

@teetak01 After using set_message_delivery_status_cb, the deregister test case is passing (tested twice). I think this functionality needs to be added in this example especially for cellular targets as responses may be delayed. I can make this part of my PR if you say so. Kindly note update case was skipped in these runs as i just wanted to test new changes for de-register.
2019-10-01_155024.zip
2019-10-01_155338.zip
diff_main.txt

@JanneKiiskila
Copy link

Yes, we need to get this callback approach fixed to the example.

@wajahat-abbas
Copy link
Member Author

I have run complete suite with mbed-os 5.14 (this commit) and tests are passing. Changes in PR itself are only name change of bootloader file. The other changes i had to make are in main.cpp for which diff is attached in previous comment.
2019-10-02_121832.zip

@teetak01
Copy link
Contributor

teetak01 commented Oct 2, 2019

@wajahat-ublox thanks for verifying. We already made a PR to fix this in the application #31

@wajahat-abbas
Copy link
Member Author

Is there anything that is to be done from our side on this PR?

@teetak01
Copy link
Contributor

build-only

Copy link
Contributor

@teetak01 teetak01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could still add line to the README about this new target with "Build-only" note in the end.

@teetak01
Copy link
Contributor

run-ci

@teetak01
Copy link
Contributor

@wajahat-ublox can you rebase this and update the README?

@teetak01
Copy link
Contributor

build-only

@iot-pdmc
Copy link
Collaborator

Test run: FAILED


Failed to build following targets:
UBLOX_C030_R412M-ARM-TCP
UBLOX_C030_R412M-GCC_ARM-TCP
Build artifacts

posted-by-tag: https://jenkins-client.isgtesting.com/job/mbed-os-example-pelion/

@teetak01
Copy link
Contributor

@wajahat-ublox I tested the compilation locally at it passed, so this mostly just requires rebase.

@wajahat-abbas
Copy link
Member Author

wajahat-abbas commented Dec 2, 2019

@teetak01
I have rebased and pushed to my branch however this PR is not updated, any idea what went wrong?

https://github.com/wajahat-ublox/mbed-os-example-pelion/tree/target_c030_r412m

Also i compiled with GCC_ARM, ARMC5 and ARMC6 and it was successful. Not sure why CI is reporting build errors?

@JanneKiiskila
Copy link

@wajahat-abbas
Copy link
Member Author

@JanneKiiskila My fork is still showing as private as i forked when this repo was private but now this repo is public?

@wajahat-abbas
Copy link
Member Author

wajahat-abbas commented Dec 2, 2019

@JanneKiiskila I have made it public still PR is not getting updated.

Also i am randomly getting OOPS 500 error page while refreshing my PR and some other PRs as well

#21 #39

@teetak01 teetak01 mentioned this pull request Dec 2, 2019
@qasim-ublox qasim-ublox mentioned this pull request Dec 4, 2019
@teetak01
Copy link
Contributor

teetak01 commented Jan 9, 2020

Closing. Already merged via #66

@teetak01 teetak01 closed this Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants