Commit Graph
750 Commits
Author SHA1 Message Date
René van Dorst 7a87b79871 Convert flash_addr to struct flash_region.
flash_region storage flash address and length, which a operation is needed.
2025-10-05 15:36:08 +02:00
logicog 05492e601a Reducing IMEM footprint in flash routines 2025-09-30 20:45:44 +02:00
logicog 110c403443 Adding firmware update at beginning of boot if a new image is found in second half of flash 2025-09-30 20:45:44 +02:00
logicog 6aa28b7385 Cleanup and increase of flash_buf size for flash write buffer 2025-09-30 20:45:44 +02:00
logicog f464be3368 Add POST code for firmware update 2025-09-30 20:45:44 +02:00
logicog 4a4abef9fd Add web-page for firmware update 2025-09-30 20:45:44 +02:00
logicog 48d57dfb0f Cleanup of flash code in installer 2025-09-29 18:07:51 +02:00
logicog 418a1326cf Merge pull request #23 from vDorst/declutter_building
Declutter building artifacts
2025-09-29 17:43:37 +02:00
logicog 2ba9675cbb Merge pull request #24 from vDorst/docs_fixes
doc: SWTG024AS: Fix component notation and fix SPIMEM signal typo.
2025-09-28 10:11:25 +02:00
René van Dorst 815e47d5cc doc: SWTG024AS: Fix component notation and fix SPIMEM signal typo. 2025-09-27 19:30:30 +02:00
René van Dorst de1c707f74 tools/fileadder: fix compiler warnings
fileadder.c: In function ‘main’:
fileadder.c:220:16: warning: unused variable ‘len’ [-Wunused-variable]
  220 |         size_t len = 0;
      |                ^~~
fileadder.c:219:16: warning: unused variable ‘line’ [-Wunused-variable]
  219 |         char * line = NULL;
      |                ^~~~
2025-09-27 17:00:54 +02:00
René van Dorst 373d723d47 build: tools: also declutter sourcecode 2025-09-27 16:52:50 +02:00
René van Dorst 2676dbd0d6 build: install: also declutter sourcecode 2025-09-27 12:52:35 +02:00
René van Dorst 432d9d77de build: uip: also declutter sourcecode 2025-09-27 12:52:31 +02:00
René van Dorst 0ac4792dde build: httpd: also declutter sourcecode 2025-09-27 12:52:24 +02:00
René van Dorst 60b854550d build: don't clutter the sources with build artifacts.
Tell sdcc to place it artifacts in "output/" folder.
2025-09-27 12:51:58 +02:00
René van Dorst 9f488415a8 Remove rtlplayground.mem 2025-09-27 12:21:19 +02:00
logicog 0d1c958ed8 Add simulation of firmware upload 2025-09-26 21:00:47 +02:00
logicog 7dc6906458 Use smaller buffer to simulate firmware behaviour 2025-09-26 21:00:47 +02:00
logicog d4ccebeaa7 Enable all compiler warnings 2025-09-26 21:00:47 +02:00
logicog d18d08287d Add menu entry for firmware update 2025-09-26 21:00:47 +02:00
logicog d4e2b9872d Cleanup of flash code
Fix several bugs found in the write-flash code during installer coding.
Move all flash functions into CODE0. This is required to share these
functions with the installer image (currently they are duplicated so
they are not within the CODE1 segment).
De-magics all Flash command codes based on the Winbond W25Q32JV
datasheet.
2025-09-26 21:00:47 +02:00
René van Dorst 2e52bcac8e Merge pull request #20 from logicog/installer
WIP: Add initial installer code
2025-09-26 17:39:46 +00:00
logicog 8aaca9ae10 Add forgotten crtstart.asm 2025-09-26 06:51:29 +02:00
logicog 5fae67afbe Merge pull request #22 from vDorst/more_docs
docs: SWTG024AS: More led information found
2025-09-22 20:14:52 +02:00
René van Dorst 9c41ada27f docs: SWTG024AS more IO found 2025-09-19 22:09:41 +02:00
René van Dorst 6e2b06fc27 docs: SWTG024AS: More led information found 2025-09-18 23:12:28 +02:00
logicog f8657f41e4 Add forgotten vlan settings update file 2025-09-15 18:03:57 +02:00
logicog c636ef3b8f Add initial installer code 2025-09-11 21:45:09 +02:00
logicog 0a1ea28691 Merge pull request #19 from vDorst/comp_fix_optimize
Fixes and code size reduction.
2025-09-11 17:31:52 +02:00
René van Dorst 2eb1416ada httpd: fix print ip-address, added missing shift. 2025-09-11 07:47:33 +02:00
René van Dorst f148bdad20 port: fix REG_SET() compiler warning.
Compiler
rtl837x_port.c:466: warning 116: right shifting more than size of object changed to zero

provided value is a uint16. So shifting it more then 16 cause this error.
Solution: cast the value to uint32_t.
2025-09-11 07:36:01 +02:00
René van Dorst 8ff124af30 httpd: fix itoa_html() does not print the middle zero.
when the input is 100.
the first zero is not printed because t = 0 and skip printing.
So the output is "10" instead of "100".
2025-09-11 07:34:18 +02:00
René van Dorst 94ae1472c3 httpd: optimize sfr_data_to_html()
This also fixes a compiler warning.
page_impl.c: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
2025-09-11 07:34:16 +02:00
René van Dorst 24f588effd httpd: Also don't byte_to_html() and itoa_html() to save 1.5kbytes.
Also fixed compiler "warning page_impl.c:47: warning 126: unreachable code".
But I think it was a false-positive.
2025-09-11 07:32:25 +02:00
René van Dorst 18f1fb5f1a http: don't inline char_to_html(), save 1k of flash 2025-09-10 16:07:59 +02:00
logicog 803e2caaa8 Merge pull request #17 from logicog/stp
STP: initial work
2025-09-08 22:27:43 +02:00
logicog 95d7901d00 Add STP control commands
Adds
	stp on
	stp off
control commands.
2025-09-08 22:25:38 +02:00
logicog 9ad5fcb43e Add STP handling
Adds a timeer for calling the STP state machine which currently sends out
CNF (HELLO) packages.

Identifies incoming STP packets and calls the stp_in() routine to handle these.
2025-09-08 22:22:57 +02:00
logicog 571bfef810 Add reading of RSTP-CNF packets and send own CNF packets
This reads RSTP configuration packages and updates the
state information about the believed Root-bridge. New
RSTP packages are sent with the updated information.
2025-09-08 22:22:57 +02:00
logicog 44298f2b71 Add MSTP port state registers for STP
Each register holds the STP port state for one Forwarding ID (FID),
of which there 16 can be used by the RTL8372. The mapping between
FID and VLAN is done in the VLAN table. This allows the SoC
to maintain 16 different MSTP states.

In the register 2 bits per port are used to designate the following
(R)STP states
00 disable, 01 blocking, 10 learning, 11 forwarding
The STP listening state is not available.
2025-09-08 22:22:57 +02:00
logicog 844fe16dc3 Merge pull request #16 from vDorst/cmd_gpio
Refactor GPIO defines and add cmd `regget`, `regset`, `gpio`.
2025-09-08 22:19:30 +02:00
René van Dorst e2afa9a61c Merge pull request #18 from vDorst/doc_SWTG024AS_v2.0_unmanaged_p2
fix: doc: SWTG024AS managed version can´t use RX-LOS.
2025-09-08 18:20:43 +00:00
René van Dorst 455d2e28d6 fix: isletter(), make everything lowercase. 2025-09-08 18:54:48 +02:00
René van Dorst b2f3d44f2b fix: doc: SWTG024AS managed version can´t use RX-LOS.
Added the serial header pinout.
Correction: Powerled is Systemled.
2025-09-08 18:45:20 +02:00
logicog 13bdcb0050 Merge pull request #15 from vDorst/doc_SWTG024AS_v2.0_unmanaged
Docs: Add SWTG024AS-v2.0-unmanaged version
2025-09-08 07:22:15 +02:00
René van Dorst 7f9147918a docs: SWTG024AS: remove old spreadsheet, rotate images 180° so silkscreen text is correct. 2025-09-07 23:57:04 +02:00
René van Dorst 588dbf6f83 Update SWTG024AS.md 2025-09-07 21:44:15 +00:00
René van Dorst 845a7f79bd fix link typo 2025-09-07 23:36:42 +02:00
René van Dorst f364f61c65 docs: Update SWTG024AS with the right gpio numbering.
See #16 with new gpio information, commands etc.

Added GPIO table and notes.
Also found some LEDs but need more investigation how to control them.
2025-09-07 23:32:58 +02:00