Normal map when painting in blender
Final result:



Overview:

As far as I know there is no way that Blender could generate normal map from diffuse map.

There is similar approach to what is going on in software like Substance or Quixel but it is painfully manual and not such fun.

In those apps you generally paint by stacking materials on layers and mask them one by one; and this you can do in Blender as well.

Steps:

You will need both Diffuse and Normal texture for both materials and created texture for painting Mask.

Node setup:



Texture Paint:

Set Slot to Image, choose your mask and start painting.



Final thoughts:

This is not ideal method especially when you need more layers/masks, this is why more and more people looks at software mentioned above (including myself).

There is another approach I can think of. You can paint your diffuse, then export it and generate Normal map in chosen app, then load it to Blender.

Blend file (textures packed):