Jeremy Greiner recently posted a question to the FreeDOS Mailing list about how to run djgpp under FreeDOS.
I am trying to get DJGPP to run in FreeDos.. and it gives me DPMI error has anyone successfully gotten DJGPP to run in FreeDos if So can you let me know how ya did it .. (note I finally moved over to FreeDos I have been watching the project since early Decmber when it was still in beta 1 stage, at that time :no offense: it wasn't ready for me to start using so I continued to use Dr DOS, well I think that there have been some major improvments and I reset my computer to run FreeDos, I hope this works hehe.)

There were several suggestions:
You need a 386 memory manager that supports DPMI. I personally like QEMM 9.0, but you can also use Microsoft's EMM386 with CWSDPMI (included in DJGPP). -- Dave Lloyd

And:

DJGPP programs run in protected mode, so you need a DPMI provider. Use CWSDPMI, available wherever you get DJGPP. You *don't* need EMM386 (but if you do use it with DJGPP/CWSDPMI, there are some caveats; see the DJGPP FAQ for details). - Jeff Williams