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

Unable to drive RGB LED on WIZWIKI W7500 and W7500P's through DigitalOut Interface #8203

Closed
naveenkaje opened this issue Sep 20, 2018 · 13 comments

Comments

@naveenkaje
Copy link
Contributor

Description

WIZWIKI W7500 and W7500P's RGB LED D1 does not turn on as expected with a simple program.
This issue was raised by a user on questions

#include "mbed.h"

DigitalOut myled(LED1);
int main() {
     myled = 0;
      while(1) {  
            wait_ms(1000);
	    myled = !myled;
     }
}

WIZWIKI W7500 Target Page
Schematic

Issue request type

[ ] Question
[ ] Enhancement
[x ] Bug

@naveenkaje
Copy link
Contributor Author

naveenkaje commented Sep 20, 2018

Adding @andrewc-arm

@andrewc-arm
Copy link
Contributor

andrewc-arm commented Sep 21, 2018

@khj098765,
Could you please review this issue? Thanks

@khj098765
Copy link
Contributor

khj098765 commented Sep 21, 2018

@andrewc-arm @naveenkaje
mbed online compiler mbed-os Library version is release 163 (mbed library. Release version 163)
I tried it with mbed online compiler. But the operation was strange.
I tried it locally with ARM, IAR, GCC_ARM. The operation was normal.
Why is this happening despite using the same Library(rev 163)?

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 21, 2018

the online compiler uses ARMCC (default profile) plus also prebuilt binary , therefore might be something there related.

How did you test locally @khj098765 ?

@khj098765
Copy link
Contributor

khj098765 commented Sep 27, 2018

@0xc0170
Online is the latest version mbed lib and local is mbed-os Rev163.
online : https://os.mbed.com/users/mbed_official/code/mbed/
local : https://github.com/ARMmbed/mbed-os/releases/tag/mbed_lib_rev163

Both online and local compiled with ARMCC.
Local compile log file
online&local compiled bin files

The bin files run differently even though you have compiled the same source code.

@ARMmbed ARMmbed deleted a comment from ciarmcom Oct 1, 2018
@adbridge
Copy link
Contributor

adbridge commented Oct 4, 2018

Internal Jira reference: https://jira.arm.com/browse/IOTDEV-1651

@naveenkaje
Copy link
Contributor Author

@khj098765 @andrewc-arm
Based on my experiments today, builds based on 510 CLI using ARMCC work as expected. But the Online compiler built binary for the same code does not work.

@khj098765
Copy link
Contributor

@naveenkaje
Yes! That's what I want to say.
It is very strange.
What should I do to solve this problem?

@naveenkaje
Copy link
Contributor Author

The issue seems to be particular to the online compiler. When a project is created on CLI from scratch, it compiles and works as expected. But on the online compiler built version does not work.

I created the project on online compile and then imported it to the CLI. It doesn't really seem to build. It reports successful build in 14 seconds which is suspicious.

mbed import https://os.mbed.com/users/naveenkaje/code/mbed_blinky_w7500/

$ time mbed compile -m WIZWIKI_W7500 -t ARM -c
Using targets from C:\mbed-cli\mbed_blinky_w7500\mbed\e95d10626187\targets.json
Building project mbed_blinky_w7500 (WIZWIKI_W7500, ARM)
Scan: mbed_blinky_w7500
Compile [100.0%]: main.cpp
[Warning] main.cpp@63,0: #1-D: last line of file ends without a newline
[Warning] main.cpp@53,0: #177-D: variable "status" was declared but never referenced
Link: mbed_blinky_w7500
Elf2Bin: mbed_blinky_w7500

Module	.text	.data	.bss
---------------------	---------------	-----------	-------------
BUILD\WIZWIKI_W7500	851(+851)	0(+0)	168(+168)
[lib]\c_p.l	10791(+10791)	16(+16)	280(+280)
[lib]\cpprt_p.l	78(+78)	0(+0)	0(+0)
[lib]\fz_ps.l	2294(+2294)	0(+0)	0(+0)
[lib]\m_ps.l	44(+44)	0(+0)	0(+0)
[lib]\mbed.ar	4812(+4812)	34(+34)	168(+168)
anon$$obj.o	32(+32)	0(+0)	0(+0)
mbed\e95d10626187	6783(+6783)	112(+112)	641(+641)
Subtotals	25685(+25685)	162(+162)	1257(+1257)
Total Static RAM memory (data + bss): 1419(+1419) bytes
Total Flash memory (text + data): 25847(+25847) bytes

Image: .\BUILD\WIZWIKI_W7500\ARM\mbed_blinky_w7500.bin

real 0m14.688s
user 0m0.000s
sys 0m0.078s

@theotherjimmy
Copy link
Contributor

@naveenkaje That's an mbed 2 project, so of course it builds quickly.

@naveenkaje
Copy link
Contributor Author

@theotherjimmy thanks for pointing that out.

I think the issue is that the default templates that is offered on online compiler for Wizwiki are all mbed os 2 based. See attached screenshort.

prjoectcreate

@khj098765 : Do you need to use mbed os 2 or can you be based off of mbed-os 5.x?

It seems like by default, the online compiler is picking mbed 2 for your project. If you move to mbed-os 5, the program works as expected.

To use mbed os 5, create a blinky program for a board like K64F and then change the target to choose Wizwiki W7500. I know it is not the ideal way to create a program, but we have some limitation w.r.t project templates for WizWiki that we are trying to fix. I have tried this method and the blinky program works as expected on Wizwiki W7500 with mbed-os.5 based build.

Do you have any requirements on which OS you need to have?

Here is a document about mbed 2 and mbed os 5. https://os.mbed.com/docs/latest/introduction/mbed-os-2-and-mbed-os-5.html

@MarceloSalazar
Copy link

Closing as target won't be supported in Mbed OS 6 - #12775

@ciarmcom
Copy link
Member

ciarmcom commented Oct 2, 2020

Thank you for raising this detailed GitHub issue. I am now notifying our internal issue triagers.
Internal Jira reference: https://jira.arm.com/browse/IOTOSM-2148

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

No branches or pull requests

8 participants