Commit Graph

168 Commits (80d58e55722107d2d004704de7b6050f0eb2e91e)

Author SHA1 Message Date
zzw b6a67c103b realtek rtl8195am remove DEVICE_EMAC
1, remove DEVICE_EMAC for wifi feature
2018-07-19 18:07:18 +08:00
Seppo Takalo e2d3769211 Provide default WiFI interface for REALTEK_RTL8195AM 2018-06-19 16:40:54 +03:00
zzw 4fc8eb1591 fix realtek_rtl8195am IPv6 build fails update
fix for #6909
    -remove the "dhcps.h" and "dhcps.c" files
    -edit "wifi_conf.c" "wifi_conf.h" and "rtw_emac.cpp" to fix compile error
rebase for #6974
2018-05-30 18:53:08 +08:00
Michael Zhang 162a8c0a00 add-rtl8195am-feature-emac (#6904)
rtl8195am feature emac implementation.
2018-05-23 12:25:18 +03:00
Kevin Bracey 6930c6d3cf Ignore old EMAC Wifi drivers
Suppress Odin W2 and Realtek Wi-fi drivers using .mbedignore
2018-05-23 12:23:59 +03:00
Tony Wu e7286bc094 rtl8195am - fix wifi_util.c warnings
Fix the following warnings:

[Warning] wifi_util.c@791,20: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] wifi_util.c@835,21: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 16:42:05 +08:00
Tony Wu 71859debd6 rtl8195am - fix dhcps.c warnings
Fix the following errors:

[Warning] dhcps.c@158,1: label 'Exit' defined but not used [-Wunused-label]
[Warning] dhcps.c@161,13: 'dump_client_table' defined but not used [-Wunused-function]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 16:34:48 +08:00
Tony Wu 7ac365c258 rtl8195am - fix wifi_promisc.c warnings
Fix the following warnings:

[Warning] wifi_promisc.c@113,61: missing braces around initializer [-Wmissing-braces]
[Warning] wifi_promisc.c@297,52: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] wifi_promisc.c@403,52: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 16:31:58 +08:00
Tony Wu 13dd84ec3c rtl8195am - fix lwip_intf.c warnings
Fix the following warning:

[Warning] lwip_intf.c@134,5: this 'if' clause does not guard... [-Wmisleading-indentation]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 16:27:37 +08:00
Tony Wu 8e4152cc06 rtl8195am - fix tcm_heap.c warnings
Fix the following warnings:

[Warning] tcm_heap.c@70,18: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'MemChunk * {aka struct _MemChunk *}' [-Wformat=]
[Warning] tcm_heap.c@70,28: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'MemChunk * {aka struct _MemChunk *}' [-Wformat=]
[Warning] tcm_heap.c@336,6: unused variable 'i' [-Wunused-variable]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 16:21:18 +08:00
Tony Wu 33cc3b7907 rtl8195am - fix rtw_emac.cpp warnings
Fix the following warnings:

[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 3 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 4 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 5 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 6 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 7 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@62,104: format '%x' expects argument of type 'unsigned int*', but argument 8 has type 'uint8_t* {aka unsigned char*}' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 3 has type 'char*' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 4 has type 'char*' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 5 has type 'char*' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 6 has type 'char*' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 7 has type 'char*' [-Wformat=]
[Warning] rtw_emac.cpp@201,101: format '%x' expects argument of type 'unsigned int*', but argument 8 has type 'char*' [-Wformat=]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 16:18:03 +08:00
Tony Wu 93a5683f92 rtl8195am - fix wifi_conf.c warnings
Fix the following warnings:

[Warning] wifi_conf.c@326,28: suggest parentheses around comparison in operand of '|' [-Wparentheses]
[Warning] wifi_conf.c@451,39: format '%x' expects argument of type 'unsigned int *', but argument 3 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@451,43: format '%x' expects argument of type 'unsigned int *', but argument 4 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@451,47: format '%x' expects argument of type 'unsigned int *', but argument 5 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@451,51: format '%x' expects argument of type 'unsigned int *', but argument 6 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@451,55: format '%x' expects argument of type 'unsigned int *', but argument 7 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,39: format '%x' expects argument of type 'unsigned int *', but argument 3 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,43: format '%x' expects argument of type 'unsigned int *', but argument 4 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,47: format '%x' expects argument of type 'unsigned int *', but argument 5 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,51: format '%x' expects argument of type 'unsigned int *', but argument 6 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,55: format '%x' expects argument of type 'unsigned int *', but argument 7 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,59: format '%x' expects argument of type 'unsigned int *', but argument 8 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,63: format '%x' expects argument of type 'unsigned int *', but argument 9 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 10 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 11 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 12 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 13 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 14 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@460,35: format '%x' expects argument of type 'unsigned int *', but argument 15 has type 'u32 * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@831,16: format '%d' expects argument of type 'int *', but argument 3 has type 'rtw_security_t * {aka long unsigned int *}' [-Wformat=]
[Warning] wifi_conf.c@1335,2: suggest parentheses around assignment used as truth value [-Wparentheses]
[Warning] wifi_conf.c@1398,13: pointer targets in passing argument 1 of 'rtw_mfree' differ in signedness [-Wpointer-sign]
[Warning] wifi_conf.c@1724,7: variable 'ret' set but not used [-Wunused-but-set-variable]
[Warning] wifi_conf.c@1770,6: variable 'ret' set but not used [-Wunused-but-set-variable]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 11:05:49 +08:00
Tony Wu 7ee2d2a862 rtl8195am - fix osdep_service.c warnings
Fix the following warnings:

[Warning] osdep_service.c@58,11: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] osdep_service.c@208,61: suggest braces around empty body in an 'else' statement [-Wempty-body]
[Warning] osdep_service.c@1063,16: pointer targets in passing argument 1 of '_rtw_mfree' differ in signedness [-Wpointer-sign]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 10:51:25 +08:00
Tony Wu 03600f6ef3 rtl8195am - fix spi_api.c warnings
Fix the following warnings:

[Warning] hal_ssi.h@28,85: suggest braces around empty body in an 'if' statement [-Wempty-body]
[Warning] spi_api.c@87,27: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] spi_api.c@76,14: unused variable 'MaxSsiFreq' [-Wunused-variable]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 10:51:22 +08:00
Tony Wu 7b0ff75f5c rtl8195am - fix pwmout_api.c warnings
Fix the following warning:

[Warning] pwmout_api.c@65,29: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 10:41:27 +08:00
Tony Wu e5f0542436 rtl8195am - fix log_uart_api.c warnings
Fix the following warnings:

[Warning] log_uart_api.c@58,38: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] log_uart_api.c@151,38: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] log_uart_api.c@260,27: unused variable 'pUartAdapter' [-Wunused-variable]
[Warning] log_uart_api.c@268,27: unused variable 'pUartAdapter' [-Wunused-variable]
[Warning] log_uart_api.c@276,27: unused variable 'pUartAdapter' [-Wunused-variable]
[Warning] log_uart_api.c@290,27: unused variable 'pUartAdapter' [-Wunused-variable]
[Warning] log_uart_api.c@328,27: unused variable 'pUartAdapter' [-Wunused-variable]
[Warning] log_uart_api.c@338,27: unused variable 'pUartAdapter' [-Wunused-variable]
[Warning] log_uart_api.c@376,45: pointer targets in passing argument 2 of 'HalLogUartRecv' differ in signedness [-Wpointer-sign]
[Warning] log_uart_api.c@386,45: pointer targets in passing argument 2 of 'HalLogUartSend' differ in signedness [-Wpointer-sign]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 10:40:11 +08:00
Tony Wu 1b815de4ac rtl8195am - fix i2c_api.c warnings
Fix the following warnings:

[Warning] i2c_api.c@94,26: comparison between signed and unsigned integer expressions [-Wsign-compare]
[Warning] i2c_api.c@231,5: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
[Warning] i2c_api.c@460,14: unused variable 'i2c_default_addr' [-Wunused-variable]

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-17 10:33:48 +08:00
Tony Wu d9c51b92fc rtl8195am - fix excessive compiler warnings
Fix hundreds of excessive compiler warnings due to out of enum type range

Examples shown as follows:
mbed-os.lib/targets/TARGET_Realtek/TARGET_AMEBA/sdk/soc/realtek/8195a/fwlib/hal_i2c.h", Line: 329, Col: 34
mbed-os.lib/targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8195A/PinNames.h", Line: 172, Col: 11

Signed-off-by: Tony Wu <tonywu@realtek.com>
2018-04-13 13:48:59 +08:00
Martin Kojtal f4fc5e6fc3 Realtek: serial - line ending fix
One line had a window line ending
2018-03-26 08:50:32 +01:00
zzw 2dc94b24d2 rtl8195am: fix LogUART Tx interrupt crash
add Mask & UnMask Tx FIFO empty interrupt for LogUart
fix LogUart interrupt enable
fix LogUart interrupt handler
coding style fix
2018-03-21 18:50:58 +08:00
Cruz Monrreal 1aa78d1e8c
Merge pull request #6326 from M-ichae-l/rtl8195am-gpio-toggle-slow-fix
rtl8195am : fix gpio toggle slow
2018-03-16 13:16:17 -05:00
Cruz Monrreal 6eeee5e49f
Merge pull request #6292 from juhaylinen/rtw-fixes
rtl8195am - improve credentials handling
2018-03-15 10:57:39 -05:00
zzw 44ed2c8189 fix mbed-ci build error L6216E
fix mbed-ci build  error L6216E
* (.ARM.exidx) and *(.init_array) must be placed explicitly, otherwise it is shared between two regions, and the linker is unable to decide where to place it.
2018-03-15 11:01:09 +08:00
zzw 20b33637f6 rtl8195am : fix gpio toggle slow
Ameba has two memory blocks: SDRAM(2M) and SRAM(512KB). SRAM has better access performance than SDRAM. So some timing critical codes must be moved to SRAM.

fix for mbed-os issue #5778

rebase for #6289
2018-03-12 14:10:40 +08:00
Juha Ylinen 1a5e751d0f rtl8195am - improve credentials handling
Add checks for empty strings
set_channel() not supported for STA mode wifi driver
2018-03-07 14:14:35 +02:00
zzw 9d30469850 mbed-os_ci-test-fixed_rtl8195am
fix section error, ARM compiler uses IRAM1.bss to calculate the heap size

fix conflict of _memset between Ameba's library and ARM compiler's library, use standard memset() instead of _memset() in case of ARM compiler
2018-02-27 11:49:38 +08:00
Prashant Ravi 011dbffff5 Fixing coding style
Fix Details: HAL API for loguart is different that UART. Initially we
didnt have support for loguart in the mbed api. These changes have been
made to support the loguart from the mbed api by using the correct HAL
api calls
2018-02-09 16:35:33 +08:00
Prashant Ravi b89ef1f3a7 fix for serial issue #5805 2018-02-05 00:24:46 +08:00
chrisyang ab9fd64981 rtl8195am - add missing changes 2018-01-26 10:58:42 +08:00
chrisyang c0a5ffb74d rtl8195am - restructure target files
restructure target files to better sync with Ameba sdk base
2018-01-24 22:51:53 +08:00
chrisyang c9fc52166a rtl8195am - reorder some defines properly in ota header file 2018-01-16 13:52:16 +08:00
chrisyang a1b4b8f10a rtl8195am - move region headers to 0xb000 and 0xc000
The new layout is as follows:

0x000000 - 0x008000  => bootloader
0x008000 - 0x00b000  => system sectors
0x00b000 - 0x00c000  => region1 header
0x00c000 - 0x00d000  => region2 header
0x00d000 - 0x010000  => reserved
0x010000 - 0x040000  => mbed file system
0x040000 - 0x120000  => region1 image
0x120000 - 0x200000  => region2 image

This is to ensure when daplink erases sections, both regions' headers
are erased properly.
2018-01-15 15:08:13 +08:00
Prashant Ravi 62667a4732 Fixing changes as requested 2018-01-08 10:49:46 +08:00
Prashant Ravi f71de8a0d7 Commit to fix the Online compiler issue for ARM mbed-os on REALTEK_RTL8195AM 2018-01-06 00:00:50 +08:00
Martin Kojtal 13dbb67891
Merge pull request #5649 from Archcady/realtek-PR-master
Fix greentea test mbed-os-tests-netsocket-connectivity
2017-12-20 14:43:37 +00:00
Martin Kojtal aff1d3002f
Merge pull request #5577 from VeijoPesonen/realtek_rtl8195am_gt_wifi-set-credential
REALTEK_RTL8195AM Wifi driver - adds check of credentials validity
2017-12-12 17:31:04 +00:00
Prashant Ravi a4ce936947 reverting all tabs to spaces 2017-12-12 21:05:27 +08:00
Prashant Ravi 01ec0da7f2 Replacing formatting issues 2017-12-12 17:09:42 +08:00
Prashant Ravi 01808db8ff Moving changes to RTW driver 2017-12-12 16:57:28 +08:00
Prashant Ravi 199ab8711a Revert "Fixing changes to make greentea test mbed-os-tests-netsocket-connectivity pass for target Realtek AMEBA"
This reverts commit 1fcfced203.
2017-12-12 16:53:45 +08:00
Prashant Ravi 1fcfced203 Fixing changes to make greentea test mbed-os-tests-netsocket-connectivity pass for target Realtek AMEBA 2017-12-04 19:18:24 +08:00
Martin Kojtal e4133501f1
Merge pull request #5531 from tung7970/feature-fota
RTL8195AM - refactor bootloader and fota support
2017-11-30 18:12:48 +00:00
Janne Kiiskilä 791343a1f7 Realtek RTL8195AM - define A3-A5 as NC
Based on the Mbed OS website the A3 is connected to "DAC", however there
is no define for DAC. In order to get the Realtek RTL8195AM to even compile
with mbed-os-example-client now, we must have the A3 defined - it is one of
the standard Arduine header pins. Therefore, setting it as NC.

A4-A5 are not connected either, so adding them as "NC" as well.

Realtek will hopefully push a proper fix sooner or later, if there is a
more meaningful define for the A3 pin. They do state however that the
A0-A3 pins are not GPIO capable anyway.

Ref: https://os.mbed.com/platforms/Realtek-RTL8195AM/
2017-11-29 12:35:02 +02:00
Tony Wu a4575a965f rtl8195am - refactor bootloader and ota support
1. move ota region 1 from 0x00b000 to 0x040000
2. move ota region 2 from 0x0c0000 to 0x120000
3. refactor bootloader header as follows:

   uint32_t tag;
   uint32_t ver;
   uint64_t timestamp;
   uint32_t size;
   uint8_t hash[32];
   uint8_t campaign[16];
   uint32_t crc32;

   where,
   a. hash is the sha256 checksum of the payload.
   b. crc32 is the crc32 checksum of headers from tag to campaign.

4. Call NVIC_SystemReset for soft reset.

Signed-off-by: Tony Wu <tung7970@gmail.com>
2017-11-28 21:33:51 +08:00
Veijo Pesonen ee77079c47 REALTEK_RTL8195AM Wifi driver - adds check of credentials
Adds checks that SSID is non-empty and that password is 8-63 characters
long when security is enabled
2017-11-24 13:08:22 +02:00
Martin Kojtal 41eb565d9c
Merge pull request #5342 from ARMmbed/feature_cortex_a
Update CMSIS/RTX with Cortex-A support
2017-11-15 11:24:36 +00:00
Jimmy Brisson f0912554d5
Merge pull request #5473 from marcuschangarm/rtl8195am_ota
Reorganize defines for firmware updates on Realtek RTL8195AM
2017-11-13 10:59:28 -06:00
Jimmy Brisson 4185c1a6cf
Merge pull request #5471 from marcuschangarm/rtl8195_flash_page
Increase flash program granularity on Realtek RTL8195AM
2017-11-13 10:58:50 -06:00
Jimmy Brisson 757a4e3b75
Merge pull request #5464 from Archcady/Fix_lockup
Fix lockup issue for REALTEK_RTL8195AM
2017-11-13 10:54:37 -06:00
Tony Wu a451498141 rtl8195am - remove redundant header file inclusion
Signed-off-by: Tony Wu <tung7970@gmail.com>
2017-11-10 09:53:42 +00:00