Coder Social home page Coder Social logo

Comments (5)

philburk avatar philburk commented on June 15, 2024

The x86 is Little-Endian and I think the Microblaze is Big-Endian.
That might be the issue.
Did you define PF_BIG_ENDIAN_DIC
http://www.softsynth.com/pforth/pf_ref.php#Compiling-pForth

from pforth.

jbdatko avatar jbdatko commented on June 15, 2024

Thanks Phil, I'll take a look. Microblaze is configurable endianness, I'm pretty sure it was set to LE, but I'll check.

Would a 64 bit generated dictionary affect running on a 32 bit system?

I also tried this on an ARM 32 platform where I thought I would have more success. I generated the dictionary from the host, copied the static dictionary, but same issue.

What does work is to start forth on the embedded system with no dictionary. This requires some hacking of things to make pforth want to initialize the dictionary w/o FILEIO, but it does work. But to date, I've been unsuccessful in bringing over a static dictionary. In the end, this may be fine as the default dictionary is a bit "feature-full" for a no-OS embedded system, but I was just surprised by this behavior.

from pforth.

philburk avatar philburk commented on June 15, 2024

Would a 64 bit generated dictionary affect running on a 32 bit system?

Yes, they are incompatible. The C code should check for that but may not.

This requires some hacking of things to make pforth want to initialize the dictionary w/o FILEIO, but it does work.

How do you "initialize the dictionary" without compiling from files, loading a dictionary file, or building with a static dictionary?

from pforth.

philburk avatar philburk commented on June 15, 2024

I tried loading a 64-bit dictionary with a 32-bit pforth executable and got:

Error in pfLoadDictionary - cell size mismatch between .dic file and code

I also tried a 32-bit dic and 64-bit code and got the same error.

I am closing this because I think the problem was using a 64-bit dictionary on a 32-bit system.

You can compile a 32-bit pforth using

cd platforms/unix
make WIDTHOPT=-m32

If you have a missing bits file you may need gcc-multilib.
See https://www.geeksforgeeks.org/compile-32-bit-program-64-bit-gcc-c-c/

from pforth.

jbdatko avatar jbdatko commented on June 15, 2024

Thanks for trying! I for sure tried 64->32, so this is probably it. I have a 32-bit arm with linux on it and I can build the dic there and try it.

Thanks again for the help.

from pforth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.