Skip to content

Instantly share code, notes, and snippets.

@jemo07
jemo07 / gist:98e606d05dfaadb27f03a8f673573dc2
Created April 28, 2022 22:39
VISUALGDB Dump from ESP8266
1>Linking ../VisualGDB/Debug/EmbeddedProject2…
1>GNU ld (GNU Binutils) 2.24.0.20150604
1> Supported emulations:
1> elf32xtensa
1>opened script file C:/SysGCC/esp8266/esp8266-bsp/IoT-SDK/ld/eagle.app.v6.ld
1>cannot find script file ../ld/eagle.rom.addr.v6.ld
1>cannot find script file C:/SysGCC/esp8266/hal\../ld/eagle.rom.addr.v6.ld
1>opened script file C:/SysGCC/esp8266/esp8266-bsp/IoT-SDK/lib\../ld/eagle.rom.addr.v6.ld
1>using external linker script:
1>==================================================
PROVIDE ( Cache_Read_Disable = 0x400047f0 );
PROVIDE ( Cache_Read_Enable = 0x40004678 );
PROVIDE ( FilePacketSendReqMsgProc = 0x400035a0 );
PROVIDE ( FlashDwnLdParamCfgMsgProc = 0x4000368c );
PROVIDE ( FlashDwnLdStartMsgProc = 0x40003538 );
PROVIDE ( FlashDwnLdStopReqMsgProc = 0x40003658 );
PROVIDE ( GetUartDevice = 0x40003f4c );
PROVIDE ( MD5Final = 0x40009900 );
PROVIDE ( MD5Init = 0x40009818 );
PROVIDE ( MD5Update = 0x40009834 );
Python Interpreter for Ghidra
Based on Jython version 2.7.2 (v2.7.2:925a3cc3b49d, Mar 21 2020, 10:03:58)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]
Press 'F1' for usage instructions
memory = currentProgram.getMemory()
filebytes = memory.getAllFileBytes()
blk = memory.getBlock(toAddr(0x40000000))
memory.removeBlock(blk, monitor)
memory.createInitializedBlock("rom", toAddr(0x40000000), filebytes[0], 0x0 , 0x1000, False)
memory.createInitializedBlock("iram", toAddr(0x40100000), filebytes[0], 0x0 , 0x8000, False)
@jemo07
jemo07 / delcomm.py
Created May 30, 2022 17:10
Quick and drity removes commnets from Forth files, creates a copy to easy upload via serial comm.
# removes comments from Forth file for easy uploading.
# Jose Morales
import os
filename = input('Enter a file name: ')
#reading from files
with open(filename) as fp:
contents=fp.readlines()
#partition the files base on the Forth comment "\"
#head, sep, tail = contents.partition('\\')
decreasing_counter=0
@jemo07
jemo07 / gist:2c797a19be4df2099046291a0dac74fd
Created July 17, 2022 16:26
Interactive developme on FORTH Mecrisp... ( Implementing UART1 on Pin 8-9)
ok.
ok.
ok.
$40034000 constant UART0_BASE ok.
$40038000 constant UART1_BASE ok.
$40014000 constant IO_BANK0_BASE ok.
: GPIO_CRTL 3 << IO_BANK0_BASE + ; << not found.
: GPIO_CRTL 3 lshift IO_BANK0_BASE + ; ok.
7 GPIO_CRTL ok.
.S Stack: [1 ] 3 TOS: 1073823800 *>
@jemo07
jemo07 / lbForth.c
Created September 20, 2022 20:32 — forked from lbruder/lbForth.c
A minimal Forth compiler in ANSI C
/*******************************************************************************
*
* A minimal Forth compiler in C
* By Leif Bruder <leifbruder@gmail.com> http://defineanswer42.wordpress.com
* Release 2014-04-04
*
* Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial
*
* PUBLIC DOMAIN
*
@jemo07
jemo07 / tvm.md
Created September 21, 2022 17:21 — forked from ilyar/tvm.md
abstract author title
The aim of this text is to provide a description of the Telegram Open Network Virtual Machine (TON VM or TVM), used to execute smart contracts in the TON Blockchain.
Nikolai Durov
Telegram Open Network Virtual Machine
@jemo07
jemo07 / combinators.forth
Created October 1, 2022 15:40 — forked from crcx/combinators.forth
Port of Retro's combinator implementations to Forth. This also has a gForth implementation of quotations from Alexander Skobelev.
\ This is an implementation of quotations and some combinators
\ for use with Forth. The combinators should work with most
\ Forth systems; the quotation implementation here is gForth
\ specific.
\ ************************************************************
\ dip
\ Stack: value quote -- value
\ Executes a quotation with a value being temporarily removed
--- Source https://hellomouse.net/~moony/TAQOZ/Forth/MORSE.FTH
TAQOZ
pub *MORSE* PRINT" Morse code keyer 200126-0000 " ;
byte dotms word _pitch
--- The character speed is related to dot length in seconds by the following formula:
--- Speed (WPM) = 2.4 * (Dots per second)
\ The following is the code I copied and ANSized from the book Starting
\ Forth by Leo Brodie. It is divided up into chapters and you can save them
\ out as separate files if you wish. Comments are welcome.
\
\ l8r, Benjamin Hoyt email: benhoyt@clear.net.nz July '97
\ -----------------------------------------------------------------------
\ CHAP1.F ---------------------------------------------------------------
\ -----------------------------------------------------------------------