Edzelf / ESP32-pdp8-simulator

PDP8 simulator running OS/8 on an ESP32.
17 stars 2 forks source link

Version esp-idf #2

Open 0un opened 4 years ago

0un commented 4 years ago

What version of esp-idf need to build? Using current version and getting an error:

CC build/main/esp_pdp8.o
In file included from E:/msys32/home/User/esp/ESP32-pdp8-simulator/main/esp_pdp8.c:33:
E:/msys32/home/User/esp/esp-idf/components/esp_event/include/esp_event_loop.h:2:2: warning: #warning "esp_event_loop.h is deprecated, please include esp_event.h instead" [-Wcpp]
 #warning "esp_event_loop.h is deprecated, please include esp_event.h instead"
  ^~~~~~~
E:/msys32/home/User/esp/ESP32-pdp8-simulator/main/esp_pdp8.c:46:10: fatal error: apps/sntp/sntp.h: No such file or directory
 #include "apps/sntp/sntp.h"
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
Edzelf commented 4 years ago

Hello Oun, Good to hear that you are interested in simulating the PDP/8. The project is rather old. I will try to fix it. I will also try to port the project to PlatformIO. Let me hear if you are interested.

0un commented 4 years ago

Thanks Edzelf, Your project is very interesting. I buy ESP32 OLED V2.0 TTGO for him.

0un commented 4 years ago

Build project!

Need esp-idf 3.1

Toolchain - https://dl.espressif.com/dl/esp32_win32_msys2_environment_and_toolchain-20181001.zip

mkdir -p esp cd ~/esp git clone -b release/v3.1 --recursive https://github.com/espressif/esp-idf.git

Create _export_idfpath.sh in msys32/etc/profile.d/

_python -m pip install --user -r $IDFPATH/requirements.txt git clone https://github.com/Edzelf/ESP32-pdp8-simulator.git make menuconfig

Change COM port WIFI settings Timezone, example: SAMT-4SAMST,M3.5.0,M10.5.0/3

Enable OLED

Component config –> ESP32-specific –> Main XTAL frequency CONFIG_ESP32_XTAL_FREQ_SEL in 26MHz

Partition table - custom select .csv

Serial flasher config Flash size - 16MB

save, exit and

make flash monitor

Thanks Edzelf for great simulator!

Jamm154 commented 2 years ago

Hello OUN and Edzelf!

I was following your instructions to build the project, but I had no luck! I got the next:

CC build/main/ssd1306.o CC build/main/esp_pdp8.o C:/msys32/home/Jamm/ESP32-pdp8-simulator/main/esp_pdp8.c:46:22: fatal error: esp_sntp.h: No such file or directory compilation terminated. make[1]: [/home/Jamm/esp/esp-idf/make/component_wrapper.mk:286: esp_pdp8.o] Error 1 make: [/home/Jamm/esp/esp-idf/make/project.mk:493: component-main-build] Error 2

Unfortunately I am not that much professional, but I would like to have this working, as in my young age I started to learn programming on a pdp-8 clone made by hungarian people called TPA-I.

I would appreciate any help, to try solving this.

I was trying to build the archive 4MB version and I had no luck with that either.

AR build/lwip/liblwip.a CC build/main/esp_pdp8.o C:/msys32/home/Jamm/esp_pdp8_4MB_flash/main/esp_pdp8.c: In function 'app_main': C:/msys32/home/Jamm/esp_pdp8_4MB_flash/main/esp_pdp8.c:2388:2: error: implicit declaration of function 'esp_deep_sleep_pd_config' [-Werror=implicit-function-declaration] esp_deep_sleep_pd_config ( ESP_PD_DOMAIN_RTC_PERIPH, // Init deep-sleep mode ^ C:/msys32/home/Jamm/esp_pdp8_4MB_flash/main/esp_pdp8.c:2390:2: error: implicit declaration of function 'esp_deep_sleep_enable_ext0_wakeup' [-Werror=implicit-function-declaration] esp_deep_sleep_enable_ext0_wakeup ( 0, 0 ) ; // Wake if GPIO is low ^ cc1.exe: some warnings being treated as errors make[1]: [/home/Jamm/esp/esp-idf/make/component_wrapper.mk:286: esp_pdp8.o] Error 1 make: [/home/Jamm/esp/esp-idf/make/project.mk:493: component-main-build] Error 2

Thank You for trying to help an old "Young".

Gábor.

Edzelf commented 2 years ago

Hello Gábor,

I also have a PlatformIO version to compile this project if you are interested. I just tried and it compiles without errors, some warnings though..

Jamm154 commented 2 years ago

Hello Edzelf. Thanks for fast reply. I would be interested, actually I do not have the 16M OLED version. If You have the 4M version for PlatformIO I would prefer tat to give it a try. I have not yet used PlatformIO, so first I have to find out how to work with it... :) I am a hobbyist programmer. I was not using my skills for about 40 years.... I just started over, trying to understand present technologies... :)

UH! I just found the PlatformIO version and it says it is also able to run on a bare ESP32... Will try to find how to compile! Thank YOU!

Edzelf commented 2 years ago

Yes, I forgot that I also published this PlatformIO version. There is enough help on the Internet for installing PlatformIO. So good luck! Once it is installed, you just have to open the folder with the PDP8 software in it and build the project. I have not developped a 4 M version, because you need enough space to simulate disk drives. After 40 years you will experience that there is nothing new in programming, only the size of all is multiplied by 1000 to 1000000....

Jamm154 commented 2 years ago

Hello Ed.

I have tryed to build the project in VsCode with PlatformIO. First I got an error during build, that I think I was able to fix. I GOOGLED for it and I found ....

//Jamm //ip4_addr_t ip_Addr ; // IP address of STA esp_ip4_addr_t ip_Addr ; // IP address of STA

//Jamm //tcpip_adapter_init() ; esp_netif_init(); ESP_ERROR_CHECK(esp_event_loop_create_default());

maybe the last line is not required, but it has no effect on build.... (No error given if it is missing)

There is still 1 warning which I could not get around.

Start

##########################################################################################################

Compiling .pio\build\nodemcu-32s\app_update\esp_app_desc.o src/esp_pdp8.c: In function 'initialize_wifi': src/esp_pdp8.c:1766:2: warning: 'esp_event_loop_init' is deprecated [-Wdeprecated-declarations] ESP_ERROR_CHECK ( esp_event_loop_init ( event_handler, NULL ) ) ; ^~~~~~~ In file included from C:/Users/Jamm/.platformio/packages/framework-espidf/components/esp_event/include/esp_event.h:28, from C:/Users/Jamm/.platformio/packages/framework-espidf/components/esp_wifi/include/esp_wifi.h:56, from src/esp_pdp8.c:32: C:/Users/Jamm/.platformio/packages/framework-espidf/components/esp_event/include/esp_event_legacy.h:241:11: note: declared here esp_err_t esp_event_loop_init(system_event_cb_t cb, void *ctx) attribute ((deprecated)); ^~~~~~~ Compiling .pio\build\nodemcu-32s\asio\asio\asio\src\asio.o

End

#########################################################################################################

and one other which I think is not important.

Start

#########################################################################################################

Compiling .pio\build\nodemcu-32s\bootloader\soc\esp32\adc_periph.o warning: style: quotes recommended around default value for string symbol SC_CS (defined at C:/Users/Jamm/Documents/PlatformIO/Projects/pdp8/src/Kconfig.projbuild:15) warning: style: quotes recommended around default value for string symbol SDA_PIN (defined at C:/Users/Jamm/Documents/PlatformIO/Projects/pdp8/src/Kconfig.projbuild:33) warning: style: quotes recommended around default value for string symbol SCL_PIN (defined at C:/Users/Jamm/Documents/PlatformIO/Projects/pdp8/src/Kconfig.projbuild:37) warning: style: quotes recommended around default value for string symbol RST_PIN (defined at C:/Users/Jamm/Documents/PlatformIO/Projects/pdp8/src/Kconfig.projbuild:41) Archiving .pio\build\nodemcu-32s\bootloader\esp-idf\log\liblog.a

End

#########################################################################################################

But after all finished, the object and ELF file generated, uploaded to the devkit, the devkit giving me the next on serial monitor... :

Start

######################################################################################################## 16:09:58.129 -> ets Jun 8 2016 00:22:57 16:09:58.129 -> 16:09:58.129 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) 16:09:58.129 -> configsip: 0, SPIWP:0xee 16:09:58.129 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 16:09:58.129 -> mode:DIO, clock div:2 16:09:58.129 -> load:0x3fff0030,len:6608 16:09:58.129 -> load:0x40078000,len:14788 16:09:58.129 -> ho 0 tail 12 room 4 16:09:58.129 -> load:0x40080400,len:3792 16:09:58.129 -> entry 0x40080694 16:09:58.129 -> [0;32mI (28) boot: ESP-IDF 4.4.1 2nd stage bootloader [0m 16:09:58.129 -> [0;32mI (28) boot: compile time 15:58:55 [0m 16:09:58.129 -> [0;32mI (28) boot: chip revision: 1 [0m 16:09:58.129 -> [0;32mI (31) boot_comm: chip revision: 1, min. bootloader chip revision: 0 [0m 16:09:58.183 -> [0;32mI (38) boot.esp32: SPI Speed : 40MHz [0m 16:09:58.183 -> [0;32mI (43) boot.esp32: SPI Mode : DIO [0m 16:09:58.183 -> [0;32mI (47) boot.esp32: SPI Flash Size : 4MB [0m 16:09:58.183 -> [0;32mI (52) boot: Enabling RNG early entropy source... [0m 16:09:58.183 -> [0;32mI (57) boot: Partition Table: [0m 16:09:58.183 -> [0;32mI (61) boot: ## Label Usage Type ST Offset Length [0m 16:09:58.183 -> [0;32mI (68) boot: 0 nvs WiFi data 01 02 00009000 00006000 [0m 16:09:58.183 -> [0;32mI (76) boot: 1 phy_init RF data 01 01 0000f000 00001000 [0m 16:09:58.183 -> [0;32mI (83) boot: 2 factory factory app 00 00 00010000 00100000 [0m 16:09:58.230 -> [0;32mI (91) boot: End of partition table [0m 16:09:58.230 -> [0;32mI (95) boot_comm: chip revision: 1, min. application chip revision: 0 [0m 16:09:58.230 -> [0;32mI (102) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=1ac28h (109608) map [0m 16:09:58.284 -> [0;32mI (150) esp_image: segment 1: paddr=0002ac50 vaddr=3ffb0000 size=03b38h ( 15160) load [0m 16:09:58.284 -> [0;32mI (156) esp_image: segment 2: paddr=0002e790 vaddr=40080000 size=01888h ( 6280) load [0m 16:09:58.284 -> [0;32mI (159) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=894c0h (562368) map [0m 16:09:58.486 -> [0;32mI (368) esp_image: segment 4: paddr=000b94e8 vaddr=40081888 size=150f4h ( 86260) load [0m 16:09:58.532 -> [0;32mI (404) esp_image: segment 5: paddr=000ce5e4 vaddr=400c0000 size=00064h ( 100) load [0m 16:09:58.532 -> [0;32mI (404) esp_image: segment 6: paddr=000ce650 vaddr=50000000 size=00010h ( 16) load [0m 16:09:58.532 -> [0;32mI (420) boot: Loaded app from partition at offset 0x10000 [0m 16:09:58.532 -> [0;32mI (421) boot: Disabling RNG early entropy source... [0m 16:09:58.532 -> [0;32mI (432) cpu_start: Pro cpu up. [0m 16:09:58.532 -> [0;32mI (433) cpu_start: Starting app cpu, entry point is 0x40082ef0 [0m 16:09:58.532 -> [0;32mI (0) cpu_start: App cpu up. [0m 16:09:58.586 -> [0;32mI (449) cpu_start: Pro cpu start user code [0m 16:09:58.586 -> [0;32mI (449) cpu_start: cpu freq: 160000000 [0m 16:09:58.586 -> [0;32mI (449) cpu_start: Application information: [0m 16:09:58.586 -> [0;32mI (453) cpu_start: Project name: pdp8 [0m 16:09:58.586 -> [0;32mI (458) cpu_start: App version: 1 [0m 16:09:58.586 -> [0;32mI (462) cpu_start: Compile time: Sep 5 2022 15:57:46 [0m 16:09:58.586 -> [0;32mI (468) cpu_start: ELF file SHA256: 28451cb08eab2382... [0m 16:09:58.586 -> [0;32mI (474) cpu_start: ESP-IDF: 4.4.1 [0m 16:09:58.586 -> [0;32mI (479) heap_init: Initializing. RAM available for dynamic allocation: [0m 16:09:58.586 -> [0;32mI (487) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM [0m 16:09:58.632 -> [0;32mI (493) heap_init: At 3FFC8DF8 len 00017208 (92 KiB): DRAM [0m 16:09:58.632 -> [0;32mI (499) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM [0m 16:09:58.632 -> [0;32mI (505) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM [0m 16:09:58.632 -> [0;32mI (511) heap_init: At 4009697C len 00009684 (37 KiB): IRAM [0m 16:09:58.632 -> [0;32mI (519) spi_flash: detected chip: generic [0m 16:09:58.632 -> [0;32mI (522) spi_flash: flash io: dio [0m 16:09:58.632 -> [0;32mI (528) cpu_start: Starting scheduler on PRO CPU. [0m 16:09:58.632 -> [0;32mI (0) cpu_start: Starting scheduler on APP CPU. [0m 16:09:58.686 -> [0;31mE (621) esp_ota_ops: not found otadata [0m 16:09:58.686 -> Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled. 16:09:58.686 -> 16:09:58.686 -> Core 0 register dump: 16:09:58.686 -> PC : 0x400014fd PS : 0x00060330 A0 : 0x80145b04 A1 : 0x3ffcb710 16:09:58.732 -> A2 : 0x00000014 A3 : 0x00000010 A4 : 0x000000ff A5 : 0x0000ff00 16:09:58.732 -> A6 : 0x00ff0000 A7 : 0xff000000 A8 : 0x00000000 A9 : 0x3ffcb6d0 16:09:58.732 -> A10 : 0x00000000 A11 : 0x3f401672 A12 : 0x3ffcb954 A13 : 0x3ffaf02c 16:09:58.732 -> A14 : 0x00000000 A15 : 0x00000001 SAR : 0x00000004 EXCCAUSE: 0x0000001c 16:09:58.732 -> EXCVADDR: 0x00000014 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff 16:09:58.732 -> 16:09:58.732 -> 16:09:58.732 -> Backtrace:0x400014fa:0x3ffcb7100x40145b01:0x3ffcb720 0x40147171:0x3ffcba30 0x40157fbd:0x3ffcba60 0x4008fe79:0x3ffcba90 0x400d5335:0x3ffcbae0 0x40157cb1:0x3ffcbb10 0x4008d105:0x3ffcbb30 16:09:58.785 -> 16:09:58.785 -> 16:09:58.785 -> 16:09:58.785 -> 16:09:58.785 -> ELF file SHA256: 28451cb08eab2382 16:09:58.785 -> 16:09:58.785 -> Rebooting... 16:09:58.785 -> ets Jun 8 2016 00:22:57 16:09:58.785 -> 16:09:58.785 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) 16:09:58.785 -> configsip: 0, SPIWP:0xee

End

########################################################################################################

And it is continuing forever.... So the chip is going GURU MEDITATION and REBOOTING..

Do You have any IDEA? Maybe the 4M on board is not enough for even just to start the emulator?

Thank You for your support. G.

Ed Smallenburg @.***> ezt írta (időpont: 2022. szept. 2., P, 21:13):

Yes, I forgot that I also published this PlatformIO version. There is enough help on the Internet for installing PlatformIO. So good luck! Once it is installed, you just have to open the folder with the PDP8 software in it and build the project. I have not developped a 4 M version, because you need enough space to simulate disk drives. After 40 years you will experience that there is nothing new in programming, only the size of all is multiplied by 1000 to 1000000....

— Reply to this email directly, view it on GitHub https://github.com/Edzelf/ESP32-pdp8-simulator/issues/2#issuecomment-1235823317, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM5FZJYXKJWGBXZBGUXFDSTV4JGURANCNFSM4QD6VSEQ . You are receiving this because you commented.Message ID: @.***>

Edzelf commented 2 years ago

I will check the software and find out if a 4MB version can be used.

Jamm154 commented 2 years ago

Hi ED! I was trying to fix, but it seems my knowledge is not enough to get around. Not giving up yet... :) but these days I have very limited time to play around. G.

Edzelf commented 2 years ago

@Jamm154: In the "archive" directory is a 4MB version. Platform is Arduino. SD card and display not yet tested, but OS/8 is running.

Jamm154 commented 2 years ago

Hello ED!

Thank You for Your support, converting the archive for Arduino. I was able to compile the 'ARCHIVE' file with ARDUINO IDE 2.0.0 after a bit of googleing... :) It is WORKING on a bare ESP32 DEV kit with only 4M.

I will start to play with after a while. (this mont and the next I am crazy busy... :( ) Thank You!

billsalt commented 1 year ago

Hi! I have one of the Aliexpress modules (purchased a long time ago and finally getting around to using). I used the Platform method and everything works except the display. Haven't tried the SD card yet. Any ideas to get the display working?

Thank you for the wonderful work!

Edzelf commented 1 year ago

The software expects an oled display.  What kind of display you have?Verzonden vanaf mijn Galaxy -------- Oorspronkelijk bericht --------Van: Bill Saltzstein @.> Datum: 12-07-2023 18:35 (GMT+01:00) Aan: Edzelf/ESP32-pdp8-simulator @.> Cc: Ed Smallenburg @.>, Comment @.> Onderwerp: Re: [Edzelf/ESP32-pdp8-simulator] Version esp-idf (#2) Hi! I have one of the Aliexpress modules (purchased a long time ago and finally getting around to using). I used the Platform method and everything works except the display. Haven't tried the SD card yet. Any ideas to get the display working? Thank you for the wonderful work!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/Edzelf/ESP32-pdp8-simulator/issues/2#issuecomment-1632863411", "url": "https://github.com/Edzelf/ESP32-pdp8-simulator/issues/2#issuecomment-1632863411", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

billsalt commented 1 year ago

Thanks for the really quick reply! I am using the "16 Mt bytes Pro ESP32 OLED V2.0 TTGO" module, the same one picutred in your documentation.

Edzelf commented 1 year ago

Bad luck, I broke the dusplay of my module a few weeks ago.  I replaced the display, but was not able to get it working again.  I will try it again next week.Verzonden vanaf mijn Galaxy -------- Oorspronkelijk bericht --------Van: Bill Saltzstein @.> Datum: 12-07-2023 18:59 (GMT+01:00) Aan: Edzelf/ESP32-pdp8-simulator @.> Cc: Ed Smallenburg @.>, Comment @.> Onderwerp: Re: [Edzelf/ESP32-pdp8-simulator] Version esp-idf (#2) Thanks for the really quick reply! I am using the "16 Mt bytes Pro ESP32 OLED V2.0 TTGO" module, the same one picutred in your documentation.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.> [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/Edzelf/ESP32-pdp8-simulator/issues/2#issuecomment-1632893227", "url": "https://github.com/Edzelf/ESP32-pdp8-simulator/issues/2#issuecomment-1632893227", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

billsalt commented 1 year ago

Thanks again Ed, let me know. Meanwhile, I'll try to wire up an SD card and check that out as well.

Bill

billsalt42 commented 1 year ago

Hi Ed, checking back; did you ever get yours working?

Edzelf commented 12 months ago

Yes, I ported the software to platform espressif32, framework arduino.