avr: Add SIMULAVR build option; don't show WATCHDOG or SERIAL_BAUD_U2X
Add a CONFIG_SIMULAVR option to the Kbuild menus and don't directly prompt users for CONFIG_WATCHDOG or CONFIG_SERIAL_BAUD_U2X. The only reason to disable these options would be if one were running on simulavr. This simplifies the user visible menu options. Also, only show CONFIG_CLEAR_PRESCALER for at90usb1286 chips. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
d2547ce6b0
commit
3af87e1c42
|
@ -75,10 +75,10 @@ cd /patch/to/klipper
|
||||||
make menuconfig
|
make menuconfig
|
||||||
```
|
```
|
||||||
|
|
||||||
and compile the micro-controller software for an AVR atmega644p,
|
and compile the micro-controller software for an AVR atmega644p, set
|
||||||
disable the AVR watchdog timer, and set the MCU frequency
|
the MCU frequency to 20Mhz, and select SIMULAVR software emulation
|
||||||
to 20000000. Then one can compile Klipper (run `make`) and then start
|
support. Then one can compile Klipper (run `make`) and then start the
|
||||||
the simulation with:
|
simulation with:
|
||||||
|
|
||||||
```
|
```
|
||||||
PYTHONPATH=/path/to/simulavr/src/python/ ./scripts/avrsim.py -m atmega644 -s 20000000 -b 250000 out/klipper.elf
|
PYTHONPATH=/path/to/simulavr/src/python/ ./scripts/avrsim.py -m atmega644 -s 20000000 -b 250000 out/klipper.elf
|
||||||
|
|
|
@ -58,6 +58,7 @@ config CLOCK_FREQ
|
||||||
|
|
||||||
config CLEAR_PRESCALER
|
config CLEAR_PRESCALER
|
||||||
bool "Manually clear the CPU prescaler field at startup"
|
bool "Manually clear the CPU prescaler field at startup"
|
||||||
|
depends on MACH_at90usb1286
|
||||||
default n
|
default n
|
||||||
help
|
help
|
||||||
Some AVR chips ship with a "clock prescaler" that causes the
|
Some AVR chips ship with a "clock prescaler" that causes the
|
||||||
|
@ -76,7 +77,8 @@ config AVR_STACK_SIZE
|
||||||
default 128
|
default 128
|
||||||
|
|
||||||
config AVR_WATCHDOG
|
config AVR_WATCHDOG
|
||||||
bool "Support for automated reset on watchdog timeout"
|
bool
|
||||||
|
depends on !SIMULAVR
|
||||||
default y
|
default y
|
||||||
config AVR_USBSERIAL
|
config AVR_USBSERIAL
|
||||||
bool
|
bool
|
||||||
|
@ -91,8 +93,20 @@ config SERIAL_BAUD
|
||||||
int "Baud rate for serial port"
|
int "Baud rate for serial port"
|
||||||
default 250000
|
default 250000
|
||||||
config SERIAL_BAUD_U2X
|
config SERIAL_BAUD_U2X
|
||||||
depends on AVR_SERIAL
|
depends on AVR_SERIAL && !SIMULAVR
|
||||||
bool "Use AVR Baud 2X mode"
|
bool
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
config SIMULAVR
|
||||||
|
depends on MACH_atmega168 || MACH_atmega328 || MACH_atmega644p
|
||||||
|
bool "Compile for simulavr software emulation"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Compile the code to run on simulavr software emulation
|
||||||
|
instead of for real hardware. This disables support for "U2X
|
||||||
|
baud" mode and for the watchdog timer which are not supported
|
||||||
|
on simulavr.
|
||||||
|
|
||||||
|
If unsure, select "N".
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in New Issue