Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with debugging KT36/48ZWSR-SX02 #33

Open
Avtopolet opened this issue Mar 26, 2024 · 1 comment
Open

Help with debugging KT36/48ZWSR-SX02 #33

Avtopolet opened this issue Mar 26, 2024 · 1 comment

Comments

@Avtopolet
Copy link

Hello. Im trying to launch firmware on KT36/48ZWSR-SX02 (board KT-6S5-C, six FETs).
Firmware compiling and flashing without errors. Im compare programmed chip and main.hex in STVP -ok
Firmware compiled as diagnostics without LCD. Consumption of controller - approx 30 mA.
Serial port connected as in instructions and nothing outgoing. Debug pin (PD2) always LOW (in first lines of main, after debug pin init im set it to HI).
Trying to use stm8-debug for VS Code, but it need elf file. Im add this to make file :
...
ELF_FLAGS = --out-fmt-elf --debug
...
$(PNAME): $(MAINSRC) $(RELS) $(CC) $(INCLUDES) $(CFLAGS) $(ELF_FLAGS) $(LIBS) $(MAINSRC) $(RELS) $(SIZE) $(PNAME).elf -A $(OBJCOPY) -O binary $(ELF_SECTIONS_TO_REMOVE) $(PNAME).elf $(PNAME).bin $(OBJCOPY) -O ihex $(ELF_SECTIONS_TO_REMOVE) $(PNAME).elf $(PNAME).hex
Its leads to error:
ACAcommons.asm:2829: Error: relocation error
make: *** [ACAcommons.rel] Error 1
Need help :)

@Avtopolet
Copy link
Author

Part of the problem was solved by reassignment debug pin to PG1. Controller starts, wheel turning and im can see telemetry by UART. But question about debugging still actual.
I'm try to use controller for my purpose (not ebike), and im want to control it by UART. When i'm send more then 11 bytes (readRtu) - controller catch array overflow exception in uart_fill_rx_packet_buffer. How to avoid it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant