Commit Graph
99 Commits
Author SHA1 Message Date
René van Dorst 56e0d0a5d1 parse_lag() make use of cmd_words_len 2026-04-18 19:35:51 +02:00
René van Dorst 7380aeb10d parse_bw() make use of cmd_words_len 2026-04-18 19:35:51 +02:00
René van Dorst 0d698dc572 parse_passwd() make use of cmd_words_len, change password memcpy. 2026-04-18 19:35:51 +02:00
René van Dorst c7fb354f08 parse_sds{get,set}() and parse_phy{get,set}() make use of cmd_words_len 2026-04-18 19:35:51 +02:00
René van Dorst 2cdab5f9d9 parse_reg{set,get}() make use cmd_words_len. 2026-04-18 19:35:51 +02:00
René van Dorst 301577efc8 parse_vlan() make use of cmd_words_len. 2026-04-18 19:35:51 +02:00
René van Dorst 1156f00f95 cmd_parser() make use of cmd_words_len 2026-04-18 19:35:51 +02:00
René van Dorst 8cbafaa347 Change cmd_tokenize() it only stores valid locations and use a length field. 2026-04-18 19:35:48 +02:00
René van Dorst 80ff1b25c9 Improve: cmd_compare().
Because `cmd` is guaranteed by the compiler to be NULL-terminated, we can make use of that to ensure the loop always ends.
So we don't need to know when the next words starts.
2026-04-18 19:15:25 +02:00
René van Dorst 1a5208110c Merge pull request #195 from logicog/fix_config_reading
Fix reading configuration over flash block boundaries
2026-04-17 11:46:03 +02:00
logicog e2717ef7ca Count pages instead of bytes reading config in execute_config() 2026-04-17 11:37:15 +02:00
logicog 1769528420 Introduce global error variable, check during config execution 2026-04-16 22:01:51 +02:00
logicog 9d4c06d752 Merge pull request #200 from feelfree69/port_names
Port names
2026-04-14 18:51:43 +02:00
logicog c3530aaafc Handle error when configuration file cmd too long 2026-04-14 18:00:29 +02:00
logicog 1683eef94b Fix bug where cmd_words[] is not properly initialized 2026-04-14 05:16:45 +02:00
logicog 036d9ca229 Add port isolation cmd 2026-04-13 20:13:28 +02:00
feelfree69 41f0dad49d Add ability to assign a name to a port 2026-04-13 14:55:10 +02:00
logicog 4440bcc43a Fix reading configuration over flash block boundaries 2026-04-09 22:34:32 +02:00
Jan Hoffmann f6a5163f33 Add commands to access PHY registers 2026-04-06 18:25:40 +02:00
Jan Hoffmann e210f31f0e Add commands to access SerDes registers 2026-04-06 18:25:35 +02:00
Jan Hoffmann 9eecdd071a Add atoi_byte function
Similar to atoi_short, but reads into a uint8_t instead of a uint16_t.
2026-04-06 18:25:30 +02:00
Jan Hoffmann c3b99fdcdf Make sure that the output of all commands ends with a newline 2026-03-27 19:36:14 +01:00
diijkstra cb8d0e45bb Review: Move w initialization 2026-03-23 19:31:06 +01:00
diijkstra f7fcf0eda7 Console: Add Ingress type & VLAN show table
Added new `vlan show` command to dump current VLAN settings.
Supports printing PVID & ingress filtering per port.

Added new `ingress [p]<mode>` command to setup ingress filtering.
Added wrappers for enabling/disabling vlan filtering. Currently
not configurable, but state in console is read via ASIC registers.

Full VLAN dump & web support of new commands will be added later.
2026-03-21 12:29:26 +01:00
feelfree69 4706f6232a simplify parsing code 2026-03-15 15:43:34 +01:00
feelfree69 e92b4a2358 Don't allow partial commands 2026-03-14 19:47:56 +01:00
feelfree69 34d46aa29a fix crash 2026-03-14 13:59:14 +01:00
feelfree69 4b167151a5 fix bank overflow 2026-03-10 21:35:25 +01:00
logicog ed8dc0f43c Fix bug in atoi_hex when uneven number of digits parsed
We fix a bug in atoi_hex when parsing an unneven number of digits
by rotating the entire number 4 bits right as would have been
done if the number had been preceded by a 0 to make the number
of digits even.
2026-03-09 06:48:24 +01:00
logicog 1836c7dcb6 Add Bandwidth control for ingress/egreess at port 2026-03-08 19:04:48 +01:00
feelfree69 ffbd2c512d Check for sifficient flashsize before applying an update 2026-02-25 18:51:00 +01:00
logicog 94d4ace88b Add support for command line editing
The current code for entering commands via the serial CLI is completely
refactored and moved out of rtlplayground.c into a separate file cmd_edit.c
putting code into BANK2.
The serial ring buffer sbuf[] is now exclusively used for receiving
keys, including escape sequences (DEL will generate a 4-byte escape
sequence). The command is now held in cmd_buffer. This reduces
XMEM use, because the serial buffer can be much smaller.

Supported is only editing the current command line via backspace, del,
cursor left and right.

Because the code cannot distinguish escape sequences which are not yet
complete (because the serial isr has not yet put all characters into
the serial buffer) from the dozens of unsupported ones (F-keys/home,
Page up/down, cursor up/down...) they are ignored and remain in the
serial buffer until the ring-pointer overwrites them. This is standard
behaviour for consoles, which will print out garbage for unsupported
characters. In this implementation, the command line buffer and the
visible command line in the terminal are always synced, so garbage
can be removed again by ediing the line.

The code makes several redundant checks in order to prevent race-conditions
between the serial ISR and the comand-editing code.
2026-02-24 19:57:22 +01:00
logicog 284b2b003d Merge pull request #127 from feelfree69/resetbutton
Add button handling with the possibility to revert to default settings
2026-02-23 21:01:14 +01:00
feelfree69 e5d23f11de Demagic FLASH_BUF_SIZE 2026-02-15 13:28:31 +01:00
feelfree69 79c9d0deab Add button handling with the possibility to revert to default settings 2026-02-14 10:55:35 +01:00
chriz ea37126e87 New apporach: Make startup config independent. 2026-02-12 14:17:22 +01:00
TylerDurden-23 7e652f3fb7 Merge branch 'logicog:main' into opt-system-settings 2026-02-11 12:31:00 +01:00
logicog 9aaddcd9b9 Reduce DSEG usage as we need 1 OSEG byte 2026-02-08 20:23:30 +01:00
logicog 708b6b7f28 Use new signatures for vlan_create and phy-settings 2026-02-08 16:46:56 +01:00
TylerDurden-23 8f3cabdaff Merge branch 'logicog:main' into opt-system-settings 2026-02-07 18:57:32 +01:00
chriz 68fd5d41a7 Add additional output. 2026-02-07 14:06:06 +01:00
TylerDurden-23 97b46071e0 Merge branch 'logicog:main' into opt-system-settings 2026-02-06 10:50:46 +01:00
chriz 3496d12111 Extend command parser. 2026-02-05 16:47:58 +01:00
logicog 9d4eef2dd6 Add support for management vlan
This adds support for the verification of a mangement vlan.
When enabled, then the switch's CPU will not listen to any packets
that are not tagged with the respective VLAN tag.
On the command line this is enabled by setting:
> vlan <vlan> mgmt

Setting the vlan ID of the management VLAN to 0 or 1 disables
the mangement VLAN function.
2026-01-29 19:56:01 +01:00
chriz 5662285a3e Clear command log after saving. 2026-01-26 23:29:23 +01:00
feelfree69 1e8382bd56 Add output of build time stamp 2026-01-22 10:24:07 +01:00
logicog a72528b724 Merge pull request #84 from vDorst/feat_version_hardware
version: Also show the hardware profile.
2026-01-20 18:37:17 +01:00
logicog 4269745521 Make dhcp client implementation available 2026-01-18 07:50:38 +01:00
René van Dorst e74c4f148a version: Also show the hardware profile. 2026-01-17 21:02:25 +01:00
logicog f621563479 Enable DIO by default 2026-01-08 06:44:38 +01:00