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

Add REALTEK_RTL8195AM to mbed-os #3758

Closed
wants to merge 91 commits into from
Closed

Conversation

Archcady
Copy link
Contributor

@Archcady Archcady commented Feb 13, 2017

Description

Add REALTEK_RTL8195AM to mbed-os

Status

IN DEVELOPMENT
Greentea test
ARMCC:
mbedgt: test suite results: 51 OK
mbedgt: test case results: 178 OK

GCC:
mbedgt: test suite results: 51 OK
mbedgt: test case results: 178 OK

IAR:
mbedgt: test suite results: 51 OK
mbedgt: test case results: 178 OK

Todos

  • Debug Ticker drifting issue
  • Tests
  • Documentation

@@ -2640,4 +2640,22 @@
"inherits": ["SARA_NBIOT"],
"extra_labels": ["ublox", "HI2110", "SARA_NBIOT"]
}
"RTL8195A": {
Copy link
Contributor

@0xc0170 0xc0170 Feb 13, 2017

Choose a reason for hiding this comment

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

The line above should have delimiter (,), this I believe is causing CI failures.

@bulislaw
Copy link
Member

bulislaw commented Feb 13, 2017

Can you also fix line endings please, it seems they are broken in:

	modified:   targets/TARGET_Realtek/TARGET_AMEBA/serial_api.c
	modified:   targets/TARGET_Realtek/TARGET_AMEBA/sleep_api.c
	modified:   targets/TARGET_Realtek/TARGET_AMEBA/timer_api.c
	modified:   targets/TARGET_Realtek/TARGET_AMEBA/timer_api.h
	modified:   targets/TARGET_Realtek/TARGET_AMEBA/us_ticker.c

@bulislaw
Copy link
Member

bulislaw commented Feb 13, 2017

mbed detect fails:

mbed detect
Traceback (most recent call last):
  File "/Users/barsza01/devel/mbed/code/mbed-os/tools/detect_targets.py", line 71, in main
    muts = get_autodetected_MUTS_list()
  File "/Users/barsza01/devel/mbed/code/mbed-os/tools/test_api.py", line 1666, in get_autodetected_MUTS_list
    detect_muts_list = mbeds.list_mbeds()
  File "/usr/local/lib/python2.7/site-packages/mbed_lstools/lstools_darwin.py", line 59, in list_mbeds
    } for v in valid_volumes
  File "/usr/local/lib/python2.7/site-packages/mbed_lstools/lstools_darwin.py", line 189, in platform_name
    if target_id[:4] in self.manufacture_ids:
TypeError: 'NoneType' object has no attribute '__getitem__'
[ERROR] 'NoneType' object has no attribute '__getitem__'

dumping data mbedls is getting from the system {'disk2': {'tty': None, 'serial': None, 'vendor_id': 3368, 'product_id': 516}}

@bulislaw
Copy link
Member

Compile errors out as well:

mbed compile -m RTL8195A
[ERROR] Class 'RTL8195ACode' required by 'RTL8195ACode.binary_hook' in target 'RTL8195A' not found in targets.py

Copy link
Member

@bulislaw bulislaw left a comment

Choose a reason for hiding this comment

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

Please fix mbed compile and mbed detect issues.

@bulislaw
Copy link
Member

Do I need special firmware to work with mbed?

@bulislaw
Copy link
Member

Issues with build:

Link: mbed-os-example-blinky
Elf2Bin: mbed-os-example-blinky
sh: /Users/barsza01/devel/mbed/code/mbed-os-example-blinky/mbed-os/targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/gcc_utility/mbed/elf2bin_mac: Permission denied

I changed the access rights there (+x), but then I'm getting:

/Users/barsza01/devel/mbed/code/mbed-os-example-blinky/mbed-os/targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/gcc_utility/mbed/elf2bin_mac: line 32: /Users/barsza01/devel/mbed/code/mbed-os-example-blinky/mbed-os/targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/gcc_utility/mbed/../../prepend_header.sh: No such file or directory
/Users/barsza01/devel/mbed/code/mbed-os-example-blinky/mbed-os/targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/gcc_utility/mbed/elf2bin_mac: line 33: /Users/barsza01/devel/mbed/code/mbed-os-example-blinky/mbed-os/targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/gcc_utility/mbed/../../prepend_header.sh: No such file or directory
cat: /Users/barsza01/devel/mbed/code/mbed-os-example-blinky/BUILD/REALTEK_RTL8195AM/gcc_arm/mbed-os-example-blinky-ram-stage-2_prepend.bin: No such file or directory
cat: /Users/barsza01/devel/mbed/code/mbed-os-example-blinky/BUILD/REALTEK_RTL8195AM/gcc_arm/mbed-os-example-blinky-dram-stage-2_prepend.bin: No such file or directory

@bulislaw
Copy link
Member

That's fixed now. Next issue:

Link: mbed-os
/usr/local/Caskroom/gcc-arm-embedded/5_4-2016q2,20160622/gcc-arm-none-eabi-5_4-2016q2/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: cannot open linker script file mbed-os/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/device/TOOLCHAIN_GCC_ARM/export-rom_v02.txt: No such file or directory
collect2: error: ld returned 1 exit status
[ERROR] /usr/local/Caskroom/gcc-arm-embedded/5_4-2016q2,20160622/gcc-arm-none-eabi-5_4-2016q2/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: cannot open linker script file mbed-os/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/device/TOOLCHAIN_GCC_ARM/export-rom_v02.txt: No such file or directory
collect2: error: ld returned 1 exit status

@bulislaw
Copy link
Member

I manage to flash the board (no fail file on the mount), but the blinky doesn't work (LED marked as D4 and D5 keep blinking), blinky uses LED1 (PB_4 -> D5) I've tried to change the frequency to make sure, but no change. I've also tried to use external LED connected to A0 (PA_0) but it doesn't work either. My guess is that board quietly refuses to flash, so back to my original question about the firmware.

Copy link
Member

@bulislaw bulislaw left a comment

Choose a reason for hiding this comment

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

There's a lot of binaries: images, executables and libraries in the sources eg (for windows as it's easier to find):

find . -name "*.exe"     
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/bedit.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/checksum.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/coan.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/cut.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/decomment.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/fart.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/gawk.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/grep.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/head.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/iarchive.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/nm.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/objcopy.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/objdump.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/padding.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/pick.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/readelf.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/sed.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/sort.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/strip.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/tail.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/basename.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/bash.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/bedit.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/cat.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/checksum.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/coan.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/cut.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/decomment.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/du.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/fart.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/gawk.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/grep.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/head.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/iarchive.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/nm.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/objcopy.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/objdump.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/padding.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/pick.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/printf.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/readelf.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/sed.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/sh.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/sort.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/stat.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/strip.exe
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/tail.exe

find . -name "*.dll"
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/cyggcc_s-1.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/cyggmp-10.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/cygiconv-2.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/cygintl-8.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/cygmpfr-4.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/cygncursesw-10.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/cygpcre-1.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/cygreadline7.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/cygwin1.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/iar_utility/tools/cygz.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/cyggcc_s-1.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/cyggmp-10.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/cygiconv-2.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/cygintl-8.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/cygmpfr-4.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/cygncursesw-10.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/cygpcre-1.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/cygreadline7.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/cygwin1.dll
./TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc/tools/cygz.dll

I don't think they should be part of the mbed OS, most of the tools seem to be standard toolchain/system tools anyway. It also means that it takes a lot of space:

du -hs TARGET_Realtek 
 44M	TARGET_Realtek

@sg- I'm assuming we don't want all the executables/libs (especially the standard ones) in the repo.

DA_0 = (PORT_U<<4|0),
DA_1 = (PORT_U<<4|1),
// Arduino connector namings
/*
Copy link
Member

Choose a reason for hiding this comment

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

Why do you comment that out? The board is Arduino form factor and the pins one the board are described with this names so it'll be confusing for the users.

extern "C" {
#endif

#if 0
Copy link
Member

Choose a reason for hiding this comment

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

An awful lot of code was commented out, is that work in progress or something that got forgotten?

"progen": {"target": "rtl8195a"},
"progen_target": "rtl8195a",
"device_has": ["ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SPI", "TRNG", "EMAC"],
"default_build": "standard",
Copy link
Member

Choose a reason for hiding this comment

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

I don't think default_build is necessary -> @theotherjimmy ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Definitely not needed.

"progen_target": "rtl8195a",
"device_has": ["ANALOGIN", "ANALOGOUT", "I2C", "I2CSLAVE", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SPI", "TRNG", "EMAC"],
"default_build": "standard",
"features": ["IPV4", "LWIP"],
Copy link
Member

Choose a reason for hiding this comment

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

IPV4 feature is not used anywhere as far as i can tell (it's being defined as FEATURE_IPV4 and grepping the code for it doesn't have any results)

Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, there's not a good place to document it, but the IPV4 feature only exists for backwards compatibility. Adopting feature LWIP is sufficient.


ENTRY(Reset_Handler)

INCLUDE "mbed-os/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/device/TOOLCHAIN_GCC_ARM/export-rom_v02.txt"
Copy link
Member

Choose a reason for hiding this comment

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

That can't be hardcoded like that. It will work for 'normal app builds' where mbed OS lives in mbed-os directory, but it will fail for any other arrangements (eg mbed test) @0xc0170 @c1728p9 do you guys know better way of doing it?

tools/targets.py Outdated
"""RTL8195A Hooks"""
@staticmethod
def binary_hook(t_self, resources, elf, binf):
sys.path.append(os.path.abspath("./mbed-os/targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/misc"))
Copy link
Member

Choose a reason for hiding this comment

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

That cannot be hardcoded like that. Please look how other targets build the paths.

@@ -0,0 +1,102 @@
/*
Copy link
Member

@bulislaw bulislaw Feb 14, 2017

Choose a reason for hiding this comment

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

We can't accept files with headers like that. You'll need to change it, Apache 2.0 is standard for mbed OS. Please do that for all the files with proprietary header.

@@ -0,0 +1,748 @@
/*
Copy link
Member

Choose a reason for hiding this comment

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

@0xc0170 @sg- it seems that they load binary ROM image with many symbols defined in it and then use them, that includes all ISR and a lot of standard library calls, are we ok with that?

@bridadan
Copy link
Contributor

Also, @0xc0170 shouldn't this PR be submitted against master?

@bulislaw
Copy link
Member

Yes, good catch. @Archcady please rebase on top of master.

@bridadan
Copy link
Contributor

@bulislaw This PR will also need to be submitted against master. We can either edit this one or this will need to be closed and reopened against master.

@Archcady
Copy link
Contributor Author

@sg- @bridadan Sorry for late reply, but should I move our code in this PR to master or should I open another PR and close the present one? Thank you.

@bulislaw
Copy link
Member

Please just edit this one if possible, I don't want all the comments lost.

@ian-qian-ting
Copy link
Contributor

Hi guys! When setting ARMCC compile options for makefiles, there are several options I initially imported from GCC which do not comply with the latest ARMCC compiler or are not recognized. The options passed are given below. Is there any guidance for me to update CFLAGS to fit ARMCC compiling environment? I don't know if old formats should be alternated or discarded...

CFLAGS += --cpu=cortex-m3 -mthumb -g2 -w -Os -Wno-pointer-sign -fno-common -fmessage-length=0 -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-short-enums -DF_CPU=166000000L -std=gnu99 -fsigned-char

Thanks and Regards
Ian

@bulislaw
Copy link
Member

I would hope you don't need to touch them, the default ones (https://github.com/ARMmbed/mbed-os/blob/master/tools/toolchains/arm.py) should do hopefully.

@ian-qian-ting
Copy link
Contributor

@bulislaw The point is that I need to use ARMCC compiler to create some rtl8195a-specific library files before arm.py eventually works. This makefile is meant for those prerequisite libraries.
BR
Ian

@bulislaw
Copy link
Member

@0xc0170 I remember you did some libraries building using mbed OS build system, is that straightforward? If not you can try using the same flags as mbed OS when building with ARMC (you can see the actual commands using mbed compile -t arm -m <platform> -v)

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 15, 2017

@0xc0170 I remember you did some libraries building using mbed OS build system, is that straightforward? If not you can try using the same flags as mbed OS when building with ARMC (you can see the actual commands using mbed compile -t arm -m -v)

You can use our tools to build a library (with some manual steps) or reproduce similar build profile manually via makefile.
We can use object files that are compiled via mbed compile and link all together to a library , however, there are symbols from mbed etc, not ideal. What I did was created a simple makefile (@ian-qian-ting I assume you already have one). As @bulislaw pinpointed, use flags from the armcc profile. You can even parse it as its json, and fill the makefile template (so a library always track mbed minor release - flags do not change often, and if they do, it would be definitely minor mbed OS release). Another question is, is this library C or C++ (I am asking because of eabi binary compability). We need to be careful with libaries in our tree and toolchain versions we use and they were used for building them. Therefore please use toolchains that we use for releases, to be compatible.

As I see it, you need to use your own profile as flags diverse from what we specify for mbed, explanation below. Back to the question about flags between toolchains,

CFLAGS += --cpu=cortex-m3 -mthumb -g2 -w -Os -Wno-pointer-sign -fno-common -fmessage-length=0 -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-short-enums -DF_CPU=166000000L -std=gnu99 -fsigned-char

Some of them are not in ARMCC neither IAR, they are GCC specific, you can compare what we have for GCC and ARMCC (we define many of those you specified for GCC ARM as well), you will find some flags similarities to the above (like ARMCC uses --c99 --gnu that might be similar to gnu99 but be aware might not 100 match in some cases, as some of those flags are specific toolchain extensions). I noticed you are using no-short-enums and signed char, that is not compatible with our flags (unsigned char, short enums for instance). Be aware of this, and care must be taken when mixing translation units (mbed and your library).

@bridadan
Copy link
Contributor

I hope this is still related, but mbed CLI also supports building libraries and uses all the same flags as mbed compile. Here's the relevant portion of the docs: https://github.com/ARMmbed/mbed-cli#compiling-static-libraries.

You could also always use the mbed export -i make_armc5 to get a base Makefile with all the flags setup for you and modify the Makefile as you see fit.

@ian-qian-ting
Copy link
Contributor

Thank you guys. It seems simple makefile could work with my case now. The only problem now is that as @0xc0170 mentioned above compiler enum is default short size while in rtl8195 it is defined as int size. This is defined in our rom code so if I use the lib built with ARMCC it shows enum packing incompatible errors. I wonder if there is any pre-configuration to force ARMCC compiler to define enum as int length when I build the library. Definitely our preference is not to change our rom code. Any suggestions on this?

Thanks
Ian

@Archcady Archcady changed the base branch from mbed-os-5.3 to master February 16, 2017 03:33
@Archcady
Copy link
Contributor Author

Seems like we have a problem in changing our code base, right now it says that we are PR against ARMmbed:master from Archcady:mbed-os-5.3 and I think it should be from Archcady:master. Do anyone have any method to fix that? Many thanks.

@bulislaw
Copy link
Member

I don't think it matters, just rebase your branch on top of mbed OS master.

@Archcady @ian-qian-ting do you guys have special mbed firmware for RTL8195A that works with mbed? The one that comes with the board doesn't seem to be able to flash mbed binary and it doesn't report serial number so the board is not recognized by mbed detect

@Archcady
Copy link
Contributor Author

@bulislaw I changed the base to ARMmbed:master, and the pull request shows up with over 250+ commits that are differences between mbed-os-5.3 and master branch. Did I do this right?

About the firmware, maybe the firmware on board is somehow corrupted. You could try update it with this one
daplink-4600.zip

(FYI: plugin micro-usb cable to CON2 while pressing the button right next to it, then you could update firmware)

@studavekar
Copy link
Contributor

/morph test-nightly

@mbed-bot
Copy link

mbed-bot commented Jun 2, 2017

Result: FAILURE

Your command has finished executing! Here's what you wrote!

/morph test-nightly

Output

mbed Build Number: 415

Build failed!

@Archcady
Copy link
Contributor Author

Archcady commented Jun 2, 2017

Strange for these errors:
[Error] RTWInterface.cpp@110,57: [Pe165]: too few arguments in function call
[Error] RTWInterface.cpp@181,0: [Pe165]: too few arguments in function call

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 2, 2017

@Archcady Can you look at those errors, I can see there also some C99 types redefinition errors (gcc arm). arm toolchain reports the error you shared above

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 2, 2017

nsapi_error_t mbed_lwip_bringdown(bool ppp); this is the new function call (bool was added) thus it fails.

@sg-
Copy link
Contributor

sg- commented Jun 2, 2017

nsapi_error_t mbed_lwip_bringdown(bool ppp); this is the new function call (bool was added) thus it fails

Seems that should have a default parameter as false for backwards compatibility? @hasnainvirk @kjbracey-arm

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 2, 2017

As I see those functions mbed_lwip functions are C functions. So this is a breaking change in there.

@kjbracey
Copy link
Contributor

kjbracey commented Jun 2, 2017

We forgot that those functions were made "public" by the EMAC stuff - EMAC drivers have to call those mbed_lwip_ functions to register. (The fact there are no EMAC drivers in the main tree is why we missed it - none showed up on searches).

Doesn't make any sense, of course, as the point of the EMAC is to abstract the stack - the last thing an EMAC driver should be doing is calling lwIP-specific registration. Those calls really should be viewed as internal.

But I believe there's no alternative until #4079 is merged.

I guess we should restore the old prototypes for bringup and bringdown for backwards EMAC compatibility.

@kjbracey
Copy link
Contributor

kjbracey commented Jun 2, 2017

PR #4431 restores the original prototypes for these functions.

@samchuarm
Copy link

@0xc0170 @sg- Hi Martin and Sam, Realtek folks are asking if there is anything that needs them to address on this lwip parameter? It seems this new parameter added in the function call nsapi_error_t mbed_lwip_bringdown is in the master branch whereas Realtek's PR is based off feature_cmsis5 branch. Thanks.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 2, 2017

@0xc0170 @sg- Hi Martin and Sam, Realtek folks are asking if there is anything that needs them to address on this lwip parameter? It seems this new parameter added in the function call nsapi_error_t mbed_lwip_bringdown is in the master branch whereas Realtek's PR is based off feature_cmsis5 branch. Thanks.

As @kjbracey-arm highlighted, we got a fix in place. If I got an access to write to this PR, I would attach a fix to this PR, and run again tests, that should make it green !

@sg- sg- added needs: CI and removed needs: work labels Jun 2, 2017
@0xc0170
Copy link
Contributor

0xc0170 commented Jun 3, 2017

The fix was merged, also cmsis5. This needs to be rebased to get those out and we shall be good !

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 3, 2017

@Archcady Can you rebase please? Or we might create a new PR rebased

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 3, 2017

rebased here #4438

@sg- sg- closed this Jun 4, 2017
@sg- sg- removed the needs: CI label Jun 4, 2017
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.