mirror of
https://github.com/elua/elua.git
synced 2025-01-25 01:02:54 +08:00
91946fc05e
This should really be more than one commit, but here it goes anyway: - added STM32F4 CDC UART support. For some reason, it seems to work only on the OTG_FS interface, the OTG_HS interface enumerates it, but doesn't seem to send/receive any data. - removed the "platform interface" functions for CDC UART. That was never really a platform interface, just a couple of functions reading and writing data from/to a CDC UART. Now each backend takes care of this as a special case in its platform_uart_xxx functions. - added buffering support for CDC UARTs - added uart.CDC to the uart module, so the CDC uart can be used directly from Lua. - stm32f4discovery now defaults to using the CDC, since it doesn't have a dedicated UART connector.
30 lines
687 B
Lua
30 lines
687 B
Lua
-- STM32F4DISCOVERY build configuration
|
|
|
|
return {
|
|
cpu = 'stm32f407vg',
|
|
components = {
|
|
sercon = { uart = "cdc", speed = 115200 },
|
|
romfs = true,
|
|
cdc = { buf_size = 64 },
|
|
advanced_shell = true,
|
|
term = { lines = 25, cols = 80 },
|
|
linenoise = { shell_lines = 10, lua_lines = 50 },
|
|
rpc = { uart = 0, speed = 115200 },
|
|
adc = { buf_size = 2 },
|
|
xmodem = true,
|
|
cints = true,
|
|
luaints = true
|
|
},
|
|
config = {
|
|
egc = { mode = "alloc" },
|
|
vtmr = { num = 4, freq = 10 },
|
|
ram = { internal_rams = 2 },
|
|
clocks = { external = 8000000, cpu = 168000000 }
|
|
},
|
|
modules = {
|
|
generic = { 'all', "-i2c", "-net" },
|
|
platform = 'all',
|
|
},
|
|
}
|
|
|