Commit Graph

142 Commits (41ee797d7feae6c84de3dd9828ef92c8f461d8d5)

Author SHA1 Message Date
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
Marcus Chang a0729952a3 Reorganize defines for firmware updates on Realtek RTL8195AM
Moved defines, typedefs and function prototypes from ota_api.c to
ota_api.h so that these can be included in applications.
2017-11-09 10:27:59 -08:00
Marcus Chang 5fe03afea6 Increase flash program granularity on Realtek RTL8195AM
The Page size has been set to 1 byte instead of the previous 256.
Although 256 is the physical page size, the driver supports
writing 1 byte at a time.
2017-11-09 09:51:06 -08:00
Yuguo Zou 6af9a5a002 Remove lines to improve readability 2017-11-09 18:23:17 +08:00
Yuguo Zou 05cf4680bd Update HAL library to fix lockup issue 2017-11-09 17:59:14 +08:00
Marcus Chang f44a15454b Increase flash size on Realtek RTL8195AM
The Realtek RTL8195AM has 2 MiB of external flash. This change
enables the FlashIAP driver to gain access to the full flash.
2017-11-07 09:25:24 -08:00
Yuguo Zou bf3d68ee88 Update HAL code to resolve ticker lockup issue 2017-11-07 17:02:42 +08:00
Tony Wu 07646db24c rtl8195am - fix us_ticker interrupt handling
TIMER2_7_IRQ is shared among several timer sources, including
us_ticker. Raising TIMER2_7_IRQ pending bit will trigger the timer
interrupt, but the timer interrupt handler will not know which timer
source this interrupt is for. This patch sets timer load value to one
tick and force us_ticker to fire almost "immediately".

TIMER2_7_IRQ is handled through a common interrupt handler, and
is automatically cleared. Therefore, there is no need to clear IRQ.

The underlying timer HAL treats load value as micro-seconds and does
conversion internally. Therefore, simply pass micro-seconds to timer
HAL without converting to tick first.

Signed-off-by: Tony Wu <tung7970@gmail.com>
2017-11-07 11:44:43 +08:00
Anna Bridge ea43b437a6 Merge pull request #5352 from Archcady/fix-event-lockup
Fix us_ticker collision and race for RTL8195AM
2017-10-26 11:01:06 +01:00
Tony Wu 1ee88fb0f6 rtl8195am - fix us_ticker collision and race
Switch to timer 2 for us_ticker for timer 6 might be used
for power saving.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-10-20 17:10:02 +08:00
Tony Wu a35c76d805 rtl8195am - remove redundant file
This file is unused and redundant.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-10-11 21:54:23 +08:00
Tony Wu f5b668a9fc rtl8195am - fix IAR zero padding issue
Remove redundant memory regions, and merge multiple RAM regions into one
to solve ielftool zero padding issue.

The side effect is less control over object files placement. It's all up
to linker's best effort.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-10-11 21:54:23 +08:00
Tony Wu e57d184fb0 rtl8195am - cleanup IAR icf file
Cleanup ICF file. No logic change.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-10-11 21:54:23 +08:00
Tony Wu d0de5f792e rtl8195am - fix ARMC6 guards
Fix ARMC6 guard typo introduced in commit 4f3f0cc9cc (Make Realtek link)

While at it, remove redundant ISR_STACK_SIZE assignment for ARMCC.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-10-02 23:45:47 +08:00
Tony Wu 5e36d32d86 rtl8195am - remove obsolete configs
The following configs were no longer necessary for RTX5.
    OS_TASKCNT
    OS_MAINSTKSIZE
    OS_CLOCK

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-10-02 14:37:05 +08:00
Tony Wu 6c1167844a rtl8195am - fix us_ticker porting
commit f7bc126 (Re-work Rtl8195AM ticker) tried to address ticker drifting
issue, but in fact broke ticker functionality. This patch adjusts us_ticker
porting to unbreak it, and to fix the following tests:

mbed-os-tests-mbed_drivers-ticker
mbed-os-tests-mbed_drivers-timeout
mbed-os-tests-mbedmicro-rtos-mbed-isr
mbed-os-features-frameworks-utest-tests-unit_tests-minimal_async_scheduler
mbed-os-features-frameworks-utest-tests-unit_tests-case_control_async
mbed-os-features-frameworks-utest-tests-unit_tests-case_async_validate

Changes are:

1. Dont disable timer after every us_ticker interrupt. That basically
   breaks ticker functionality.

2. Fine-tune us to tick conversion macro. Previous conversion method
   yields 1 tick drift every 2 ms.

3. Remove special placement of ticker objects. No longer necessary.

Signed-off-by: Tony Wu <tonywu@realtek.com>
2017-09-20 11:03:22 +08:00
Anna Bridge 003dd7c47f Merge pull request #5044 from Archcady/Profile_debug
Realtek_RTL8195AM fix for debug profile
2017-09-19 10:43:25 +01:00
Jimmy Brisson aeda7f7d28 Merge pull request #5069 from deepikabhavnani/assert_added
Changed error print to assert
2017-09-15 17:50:49 -05:00
Yuguo Zou f7bc12626d Re-work Rtl8195AM ticker
Remove intermediate variances and use uint64 instead;
Remove HalTimerIrqEn called in us_ticker.c
2017-09-15 18:53:24 +08:00
Jimmy Brisson 45b59b442b Correct long call macros for ARMC6 2017-09-13 09:48:55 -05:00
adbridge 32bd25e8df Fix include file for ARMCC 6, should use cmsis_armclang.h 2017-09-12 16:41:11 +01:00
Jimmy Brisson 4f3f0cc9cc Make Realtek link
There was some interesting stuff here.
 * ARMC6 treats assembly the same as GNU, but has a different startup
   function, so we branch the asm there
 * Incorrect discriminant, probably copied from other ports
2017-09-11 13:20:33 -05:00
Jimmy Brisson 15a9a0382b Enable Compiling with ARMC6 across all targets
remove duplicate sys.cpp
2017-09-11 13:20:32 -05:00
Deepika 65150b62b9 Added assert for malloc 2017-09-11 11:41:34 -05:00
Anna Bridge cab660d980 Merge pull request #4938 from deepikabhavnani/IAR_fixes
Update IAR to version 8
2017-09-11 17:28:38 +01:00
Yuguo Zou ba3bb7ea35 Remove unused code
Clean rtl8195a_init.c a little bit
2017-09-07 15:10:08 +08:00
Yuguo Zou 2642ab321e Update wlan lib to fix debug profile
The issue of mutex returning osErrorISR with debug profile is fixed
2017-09-07 11:05:06 +08:00