Skip to content

Instantly share code, notes, and snippets.

View bri3d's full-sized avatar
👋

Brian Ledbetter bri3d

👋
  • Boulder, CO
View GitHub Profile
@bri3d
bri3d / qemu-tricore.md
Created February 5, 2021 14:52
Getting TriCore qemu + gdb working!

Getting QEMU

The mainline release of QEMU includes working simulation of Tricore. Both TC1.3 and TC1.6 CPU instruction sets are supported. No peripherals are implemented.

However, the mainline QEMU's "triboard" based machine specification is insufficient for most ECU use cases as it does not define the correct memory regions or aliasing.

I have an example of setup for Simos18 here: https://github.com/bri3d/qemu/tree/tricore-simos18 . The kernel load code (and constants) as well as the hardcoded entry point are actually unnecessary with the use of the QEMU "loader" device, documented below.

So, to get started, first we simply build QEMU for Tricore: ./configure --target-list=tricore-softmmu && make . You should now have a qemu-system-tricore binary, provided your dependencies were set up correctly (the QEMU documentation is good for this).

@bri3d
bri3d / send_encoding.rb
Created May 23, 2013 22:07
Encoding getting lost through Symbol conversion in send (JRuby 1.7.x)
# encoding: utf-8
nyay = "ñ"
puts "Source string's encoding is #{nyay.encoding}"
class TestDispatch
def method_missing(name, *args)
puts "Sent name is a #{name.class.inspect} with encoding #{name.encoding}"
puts "Sent name as a string is #{name}"
end
end
t = TestDispatch.new