Why PSTR does not work?

So far I got my board programmable but I still run into issues with PSTR.
I cannot get text displayed on screen if I use PSTR macros.
When I was using Arduino Nano it did work.
I believe there is something related to how memory gets organized.

[plaformio]
env_default = atmega1284

[env:atmega1284]

platform = atmelavr
board = 1284p16m
framework = arduino
board_build.mcu = atmega1284p
board_build.f_cpu = 16000000L
lib_extra_dirs = ~/Documents/Arduino/libraries
upload_protocol = avrispmkII
build_flags = -Wl,-Map,output.map

This is how PSTR is being used in context nanodds/screen.h at master · zoonman/nanodds · GitHub

After digging through all that stuff I ended up with firmware.lst which I got using following command ~/Library/Arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-objdump -h -S firmware.elf > firmware.lst

firmware.elf:     file format elf32-avr

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .data         00000122  00800100  00008abe  00008b52  2**0
                  CONTENTS, ALLOC, LOAD, DATA
  1 .text         00008abe  00000000  00000000  00000094  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .bss          00001eea  00800222  00800222  00008c74  2**0
                  ALLOC
  3 .comment      00000011  00000000  00000000  00008c74  2**0
                  CONTENTS, READONLY
  4 .note.gnu.avr.deviceinfo 00000040  00000000  00000000  00008c88  2**2
                  CONTENTS, READONLY
  5 .debug_aranges 00000380  00000000  00000000  00008cc8  2**3
                  CONTENTS, READONLY, DEBUGGING
  6 .debug_info   00001ab6  00000000  00000000  00009048  2**0
                  CONTENTS, READONLY, DEBUGGING
  7 .debug_abbrev 00000959  00000000  00000000  0000aafe  2**0
                  CONTENTS, READONLY, DEBUGGING
  8 .debug_line   0000148c  00000000  00000000  0000b457  2**0
                  CONTENTS, READONLY, DEBUGGING
  9 .debug_str    00000296  00000000  00000000  0000c8e3  2**0
                  CONTENTS, READONLY, DEBUGGING

Disassembly of section .text:
.......


00000302 <_ZZ16displayFrequencyvE3__c>:
     302:	46 72 65 71 75 65 6e 63 79 3a 00                    Frequency:.

........

To the best of my knowledge it looks like it places the data into correct place. I assume .text supposed to store program text which is exactly what we have.

But I don’t understand why it doesn’t get displayed.

My guesses - compiler doesn’t place static address back or this address is wrong or something prevents/doesn’t do pgm_read.

Did you try a simple example with a PSTR and pgm_read? And also can you insert debug print statements so that we know for sure that it goes into the lower function?

I haven’t tried that but what I discovered so far: CLion lands me to ~/.platformio/packages/framework-arduinoavr/cores/arduino/Print.cpp on that call

size_t Print::print(const char str[])
{
  return write(str);
}

and what I suspect here that something is wrong.
I believe PSTR should tell compiler to use

size_t Print::print(const __FlashStringHelper *ifsh)
{
  PGM_P p = reinterpret_cast<PGM_P>(ifsh);
  size_t n = 0;
  while (1) {
    unsigned char c = pgm_read_byte(p++);
    if (c == 0) break;
    if (write(c)) n++;
    else break;
  }
  return n;
}

which would totally make sense.
Also, I tried

    tft.print(F("SuperTest"));

which lands in that place.
Obviously because of

#define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal)))